Skip to content
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

Tile maps - increase precision on zoom #2034

Closed
pemontto opened this issue Nov 25, 2014 · 8 comments · Fixed by #3667 or #3829
Closed

Tile maps - increase precision on zoom #2034

pemontto opened this issue Nov 25, 2014 · 8 comments · Fixed by #3667 or #3829

Comments

@pemontto
Copy link

When browsing around a tile map it would be nice if the precision value increased in line with the zoom level.

This sounds simple but I understand having the precision "in line" with the zoom may be harder than it seems depending on the data being displayed.

@rashidkpc
Copy link
Contributor

This is a feature we're planning to implement in the future.

@rashidkpc
Copy link
Contributor

One perception of performance way to implement this would be to request a high precision, maybe around 8, right off the bat. Then combine the buckets in the view when zoomed out, breaking them down as we zoom in.

@jmleoni
Copy link

jmleoni commented Jan 7, 2015

This was a nice feature of bettermap in Kibana 3. Could this be added to the Kibana 4 roadmap ?

@quasipedia
Copy link

👍

@captainhurst
Copy link

👍

@jmleoni
Copy link

jmleoni commented Jan 26, 2015

I am thinking about a proper way of doing this.
The problem being you need a way to tap into the queries to override the precision of the geohash_grid bucket. Right now I am thinking of passing an option with the precision to the geo_bounding_box filter I created for #2035. This way, each time you click on a geo cluster on the map, it will set the geohash_grid to the right precision level.

@jthomassie
Copy link

One of many challenges here is that map zoom and geohash precision do not have a one-to-one relationship. Map zoom goes from 2 to 16 (soon to 18), and geohash precision goes from 1 to 6 (configurable up to 12), so the relation is closer to 2 or 3 map zooms per precision change, and the ideal usually depends on the bounds of your data.

Thinking that the precision chosen and the data bounds may suggest an ideal map zoom rather than the other way around.

@jmleoni
Copy link

jmleoni commented Feb 25, 2015

I agree with you, things would be much simpler if you set once and for all the precision and it never changes for the life of the widget (only the data boundaries would change given the data returned by ES).

There is a catch though : this approach makes interactive geographical drill down impossible below the precision level already defined.

The alternative is to use marker clusters instead of geohash_grid (the clustering being done on the client side) If you do this, then you encounter an other problem : it won't scale much if you have clusters with many markers (retrieving all coordinates from ES might take quite long compared to having ES doing the clustering and just returning the clusters).

So maybe we could have a mix of the two :

  • compute clusters with a geohash_grid
  • When a user clicks on a cluster:
  • set a query filter with a geobounding box set according to the bounding of the cluster being clicked
  • if the number of single points inside the cluster is below a threshold the widget flips to the marker clusters mode
  • if the number of single points inside the cluster is above a threshold then you recompute a geohash_grid with an increased precision.

Btw I have already issued a pull request that sets the zoom automatically based on the data boundaries of the data returned by ES (#2970)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants