Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Search does not automatically zoom on best result #38

Closed
poVoq opened this issue May 26, 2015 · 18 comments · Fixed by #123
Closed

Search does not automatically zoom on best result #38

poVoq opened this issue May 26, 2015 · 18 comments · Fixed by #123

Comments

@poVoq
Copy link

poVoq commented May 26, 2015

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!

@v1r0x
Copy link
Contributor

v1r0x commented Sep 2, 2015

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?
I don't know which would be best. Maybe @jancborchardt has an idea?

cc @DJaeger @Henni @brantje

@poVoq
Copy link
Author

poVoq commented Sep 2, 2015

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?

@jancborchardt
Copy link
Contributor

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.

@DJaeger
Copy link
Contributor

DJaeger commented Oct 17, 2015

I think it should not center anything until a result is chosen.

@jancborchardt
Copy link
Contributor

@DJaeger it should definitely zoom/center on the set of results, so it’s easier to choose a specific result.

@DJaeger
Copy link
Contributor

DJaeger commented Oct 21, 2015

@jancborchardt: Mhm, you are right.
That would realy make the choose easier.

@DJaeger
Copy link
Contributor

DJaeger commented Oct 21, 2015

But what, if I start typing the name of a contact and not an address?
Then the results could be more widely spreaded than one single city.
Shouldn't we choose a BBOX spanning all currently shown results?
Or we always zoom and center on only the first result while typing and on hovering/focusing another one, center and zoom to only that one.

@jancborchardt
Copy link
Contributor

@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.

@v1r0x
Copy link
Contributor

v1r0x commented Oct 21, 2015

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?

@Henni
Copy link
Contributor

Henni commented Oct 21, 2015

@v1r0x yes, that's how I would solve this for now.

@v1r0x
Copy link
Contributor

v1r0x commented Oct 21, 2015

@Henni Ok, I will move the regarding code to my test environment and try to solve it.

@jancborchardt
Copy link
Contributor

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.

@v1r0x
Copy link
Contributor

v1r0x commented Oct 21, 2015

Maybe waiting for the user to choose a result and pan to the selected result whould be the easiest (same as in g maps)

@DJaeger
Copy link
Contributor

DJaeger commented Oct 21, 2015

I second the solution of @v1r0x.
I think OSM is doing it also.

@jancborchardt
Copy link
Contributor

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.

@DJaeger
Copy link
Contributor

DJaeger commented Oct 22, 2015

But we can mention OSM if they do it the same way like G to confirm a "well known behaviour". ;-)
I think OSM has become much better in the last few years and is now in general also usable by the mainstream users.

@jancborchardt jancborchardt added this to the 0.1 – the basics milestone Dec 27, 2015
@jancborchardt
Copy link
Contributor

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? :)

@v1r0x
Copy link
Contributor

v1r0x commented Dec 28, 2015

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.
Thus we can fix this one and #21 as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants