Closed AaronV77 closed 6 years ago
Bokeh does not provide control over the zoom level, however in the next HoloViews release we will automatically apply padding to the axes which should improve things a fair bit.
Alright, so I should post this issue into Bokeh rather than GeoViews, or is this just something that will not be supported?
It seems unlikely that this will be supported since, at least to me, it seems incompatible with the way axis ranges are handled. Could you elaborate on the benefit of controlling the zoom level independent of the ranges of the axes? What would happen as you zoom in and out?
Here's what this plot will look like by default after the next HoloViews release:
The benefit would be that you don't have to specify a extent / bounding box to control how far the plot zooms in / out. So if I have a point in the middle of Austin Tx, and I want to see where it is from a world view then I can just say zoom_level = 0 rather than give the extent / bounding box of the whole world. It just allows the user to not have to know a given bounding box to get a certain view of their points / polygon / etc. Thanks.
We could probably emulate that behavior in some way by translating the zoom level to bounds internally.
Yes, it seems like we could provide a separate utility function to translate a zoom level and a list of Elements into a bounds, and I can see how that would be useful. The list of Elements would be anything that has a location or an extent, and the function would find the total extent of all those things, take the center of that, then choose an appropriate bounds around it for the given zoom level.
But I think the way it works now is much more general, given that "zoom level" is an entirely arbitrary convention, so I'd only want that functionality to be an explicit, separate utility that can be used deliberately if someone wishes. Something like mercator_zoom_bounds()
?
Given that such a utility function would be entirely independent from the rest of the HoloViews/GeoViews code, it seems like an excellent first PR for a new contributor. :-)
So after taking some time of thinking about what you guys have said I completely forgot about the URL that comes from the tile source. The URL takes an X, Y, and a Z, and the z is zoom_level witch either Bokeh or something is giving this URL a z number, or the return from the tile server would be return an error.
Not sure what you mean precisely, but yes, Bokeh is computing the appropriate zoom number in its tile source code.
Sorry Jim, I was more or less thinking aloud, but after talking to Scott I now have a better understand of what you mean and how to go about implementing this utility. I'll start to look more into this. Thanks.
Hey guys,
I got messing around with the WMTS geoviews class and I see that there is no ability to pass in a zoom level for a given plot. So here is my following code:
Now this by default will zoom right into the point itself which I think is way to close, and is possibly a bug. If only one point is given I don't think it should be so close to the point by default.
So if a zoom level option was available you could increase the performance of the plot because it is not trying to get all the tiles at a zoom level of 19/24, and it adds more functionality that would be great for bounding boxes, polygons and so on. Thanks.