Open hyerra opened 6 years ago
I like this a lot, I'm currently doing something myself.
Also something to consider is that sometimes this bounding box can be massive (depending on the implementation and use case). Maybe TerrainNode
could select a zoom level based on the bounding box to optimize for loading time.
Yep, maybe the base zoom level could be 14
as in the sample project and mapbox could scale it up and down as need be. Of course a base zoom level could also easily be specified by the dev.
Yes! exactly so
That's awesome! However as you mentioned it only partly fixes it.. this PR just handles zoom levels.
I thought this would be a really interesting feature if possible. Create a new initializer
TerrainNode(lat: , lon: )
that would take a coordinate and dynamically calculate the bounding box for you. It would use feature querying to check and see if the coordinate was a place in the city, natural park, etc. If it was in the city, the user is likely looking at a couple buildings and therefore the bounding box should presumably be small. However, if the feature is like a natural park they are likely looking at terrain and would want an understandably bigger bounding box.It's a very preliminary idea but it would be very interesting if it could be implemented. I've noticed myself that different types of features require different bounding box sizes.