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

Feature Request: zoom on select result #62

Closed
royhobbstn opened this issue Oct 16, 2015 · 11 comments
Closed

Feature Request: zoom on select result #62

royhobbstn opened this issue Oct 16, 2015 · 11 comments

Comments

@royhobbstn
Copy link

An option - integer - corresponding to Leaflets zoom levels. Allows user to set a default zoom level when selecting a geocoding result.

Use Case: When a user is zoomed out to the state level, but searches for a small town within the state. (In this case, simply panning to the result does not bring the user to a useful map extent).

@dianashk
Copy link
Contributor

@royhobbstn, thanks for the feature request. We'll discuss this in our next planning meeting and update the issue accordingly.

The zoom issue has been a concern for us as well, and we're hoping to address it to some extent with the introduction of bounding boxes for places that have geometry. That way, we'll be able to zoom to the right level when a bounding box is present and when it's just a point, use a default zoom level that you're requesting. Do you think that would address your concern? This bounding box feature should be coming online in the next 2-3 months.

@royhobbstn
Copy link
Author

That's an even better solution than I had in mind. I'm looking forward to seeing that implemented. For now I've made a quick hack for zooming that works, so no hurry.

@riordan
Copy link
Contributor

riordan commented Oct 16, 2015

Yes! We totally want this too!

We've considered this idea of setting default zooms for the different types of results (e.g. one for venues/addresses, another for cities, another for countries), but think we've got something even better coming soon.

We're looking to capture the geographic boundary of everything we import, so each place will have a bounding box that describes its size appropriately (outlined here: pelias-deprecated/quattroshapes#29). It's part of our next big push, and it'll mean that if you search for a huge city or country, you'll still be able to see everything, rather than defaulting to a particular zoom size that may or may not correctly encompass the result.

@riordan
Copy link
Contributor

riordan commented Oct 16, 2015

And it appears @dianashk and I are of the same mind.

@dianashk
Copy link
Contributor

@royhobbstn 👍 Glad you've been able to make it work for now. Stay tuned for improvements.

In the meantime, we'd love to learn more about how you're using the plugin and maybe even spotlight your work if you're interested in sharing it at some point. Understanding how the community is engaging with the tools is tremendously helpful in assigning priorities to tasks and adding/changing/removing functionality.

@riordan, wouldn't be the first time! 😄

@royhobbstn
Copy link
Author

@dianashk I learned about this project at jsgeo. I have a few thoughts about the plugin/geocoder and I'll send you an email later today.

@riordan riordan removed the 1.next label Jan 12, 2016
@riordan riordan added this to the Who's on First milestone Jan 12, 2016
@riordan riordan added on-deck and removed processed labels Jan 27, 2016
@dianashk
Copy link
Contributor

@royhobbstn, great news! We now have a bbox property for each feature in the results. This should help you zoom out to the right level. Let us know if there are any issues with this property. The zoom level isn't updated automatically in leaflet, just yet.

@skorasaurus
Copy link
Contributor

I implemented this using an event, here's an example since Lou added events support.

Thanks @louh for adding this!

@royhobbstn Does this solve your use case(s)?

@louh
Copy link
Contributor

louh commented Dec 5, 2016

You're welcome, @skorasaurus! Thanks for supplying your example. Ideally, developers will use the events to respond to selection the way they need, since we can't make too many assumptions about what's needed on the library side.

@louh
Copy link
Contributor

louh commented Mar 7, 2017

TODO: let's include @skorasaurus's example in the documentation.

@louh louh modified the milestones: 1.8.0, Who's on First (Phase 2) Mar 7, 2017
@louh
Copy link
Contributor

louh commented Mar 8, 2017

Added 7f6c39f

@louh louh closed this as completed Mar 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants