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

Dynamic bounding box when supplied a coordinate #23

Open
hyerra opened this issue Aug 8, 2018 · 5 comments
Open

Dynamic bounding box when supplied a coordinate #23

hyerra opened this issue Aug 8, 2018 · 5 comments
Labels
enhancement New feature or request

Comments

@hyerra
Copy link

hyerra commented Aug 8, 2018

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.

@camdeardorff
Copy link
Contributor

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.

@hyerra
Copy link
Author

hyerra commented Aug 8, 2018

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.

@camdeardorff
Copy link
Contributor

Yes! exactly so

@camdeardorff
Copy link
Contributor

#39 works to fix part of what is mentioned in here. Thanks @avi-c !

@hyerra
Copy link
Author

hyerra commented Aug 31, 2018

That's awesome! However as you mentioned it only partly fixes it.. this PR just handles zoom levels.

@jim-martin jim-martin added the enhancement New feature or request label Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants