-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tilemap zoom precision #3713
Tilemap zoom precision #3713
Conversation
@rashidkpc please take a look now. Lost the mapZoomEnd event code when I merged in master. |
@@ -125,6 +125,46 @@ define(function (require) { | |||
|
|||
editableVis.listeners.click = vis.listeners.click = filterBarClickHandler($state); | |||
editableVis.listeners.brush = vis.listeners.brush = brushEvent; | |||
editableVis.listeners.mapZoomEnd = vis.listeners.mapZoomEnd = function (event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the idea of sticking map specific code in editor.js. Couldn't this be done in src/kibana/plugins/vis_types/vislib/tile_map.js
?
You might take a look at how the rectangle
event is handled for the tilemap filter here: https://github.com/elastic/kibana/pull/3671/files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I wIll work on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I meant to do that. Fixed now.
… way to change state from listener
@@ -126,6 +126,47 @@ define(function (require) { | |||
editableVis.listeners.click = vis.listeners.click = filterBarClickHandler($state); | |||
editableVis.listeners.brush = vis.listeners.brush = brushEvent; | |||
|
|||
// editableVis.listeners.mapZoomEnd = vis.listeners.mapZoomEnd = function (event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove all this commented out code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still needs to be removed.
…o 2, removed config from editor.js
@rashidkpc I've made updates to address the latest comments and merged master. Please take a look. |
@@ -31,6 +32,38 @@ define(function (require) { | |||
filter.geo_bounding_box[field] = event.bounds; | |||
|
|||
pushFilter(filter, false, indexPatternName); | |||
}, | |||
mapZoomEnd: function (event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't check if autoPrecision is turned on, so there's no way to disable it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding autoPrecision attr to the mapZoomEnd event to check for this.
Yes, using courier.fetch to redraw the maps is causing this. The maps get destroyed and redrawn at 'zooomend' if autoPrecision attr is true. |
@rashidkpc please take a look at this again. I am not sure if there is a way around the split maps all redrawing on zoom if autoPrecision is true until we can persist the map states. Do you have an idea how we might get around this? |
… being filtered to map view bounds
This doesn't seem to increase precision beyond 7 anymore? |
Added option to change precision as you zoom in on a tile map
Closes #2618, closes #2034.
• added param and input checkbox to agg editor, defaults to true
• hides precision slider if true
• added mapZoomEnd event to dispatch