-
Notifications
You must be signed in to change notification settings - Fork 20
Search does not automatically zoom on best result #38
Comments
I implemented this right now. But my problem is, that if the user searches for "berlin" they automatically get the city Berlin as result and the map pans to this result (which is what you want I think, and I want, too). Since it is possible to search for contacts as well, this should also load all contacts with an address in berlin. So where should the map pan to? The city or one of the contacts? |
Displaying the city seems like a reasonable default behavior. Maybe some check boxes under the search field to limit the search to contacts only, or to exclude contacts (other ideas?) would make sense? |
Yep, the city should be centered. No checkboxes or additional settings for now, as when the city is centered all Contacts should be in view anyway. |
I think it should not center anything until a result is chosen. |
@DJaeger it should definitely zoom/center on the set of results, so it’s easier to choose a specific result. |
@jancborchardt: Mhm, you are right. |
But what, if I start typing the name of a contact and not an address? |
@DJaeger I’d say BBOX is a good first approach which solves the problem in a general way. We can think about zooming into the best/first result automatically later. |
So, If I search for "berlin" and have a contact named "Something Berlin" located in Paris, it should center to a BBOX from Paris to Berlin? |
@v1r0x yes, that's how I would solve this for now. |
@Henni Ok, I will move the regarding code to my test environment and try to solve it. |
Yeah, we definitely need to fix this in a better way in the future as there will be lots of »Berliner Straße« as well. We can also experiment with always focusing on the best result, but a good first pass is the BBOX. |
Maybe waiting for the user to choose a result and pan to the selected result whould be the easiest (same as in g maps) |
I second the solution of @v1r0x. |
In Google Maps, pressing enter after putting in a search term chooses the first (best) result and zooms to it. That seems good. @DJaeger I wouldn’t necessarily use OSM as a good example since they do lots of things quite badly. ;) We can improve on that. |
But we can mention OSM if they do it the same way like G to confirm a "well known behaviour". ;-) |
This bites me again and again, thinking search is broken. ;) @v1r0x you said you implemented something here, can you maybe just put up a work-in-progress pull request of this? :) |
There is a really messed up branch in my fork. We can have a look at it here and discuss what we want and what we don't want so we can start a proper and clean branch here. |
If I search there seems to be a marker placed at possible search results, but I would like the map to automatically pan and zoom to the best guess result, and maybe list a set of other possible results in the side bar.
Thanks!
The text was updated successfully, but these errors were encountered: