Open pointhi opened 11 years ago
OpenStreetMap is not an end user mapping site, so doing something because google maps does it is never a good argument.
Displaying markers automatically only really works well when all the results are in a reasonably small area - otherwise you just wind up with a fully zoomed out view with a load of markers scattered over it. It would be interesting to see how well a typical search did work, but I'm not entirely sure how you decide what is and is not typical.
i don't think, because google does it, OSM must do it,
but it is not very clear, when you search, for example fuel stations, where there are, and how they are distributed.
I'm know, that this feature must be well thought out. Restricted the feature to disticts, or even city's would help that the poi's aren't on a to big area (or similar when there are not many results). Also restricted it so, that it would only show the poi's, when there are simmilar.
I guess part of it is that I don't usually search for something generic like "fuel stations" but I'm more likely to search for a specific place name and hence it's more likely that the matches are in wildly different places.
I think it's the best I program a demo function, and then we'll see if the feature is useful or not, and how hard it is to prevent problematic output.
In reply to "Displaying markers automatically only really works well when all the results are in a reasonably small area": the current behaviour is to zoom on an area around the first nominatim hit. IMHO, after a search, the map should zoom to a bounding box around all the current hits, this makes more sense also with the current way of showing the locations only on hover (which otherwise happen to be frequently offscreen). If this means the results are scattered on a bigger area (or maybe in several clusters distant from each other), at least it is visible, and the users can always zoom in to something they see, while it is harder to understand they would have to zoom out to see something they cannot see now. Unless they already know, it is harder to discover. And at this point, all hits could be visualized together, and the hover could highlight it somehow (scaling, or color, etc.).
Maybe it has to distinguish between places and POIs. For places, if Nominatim has concluded there is a huge imbalance of significance, the current behaviour seems just right, although an additional button like "show all the results on the map" (at once) would still be very much appreciated. For example a search for "London" should probably not zoom to the city of 380.000 in Ontario, https://www.openstreetmap.org/node/485248691 despite it is probably still much more important than the city of London in Arkansas with 1000 inhabitants https://www.openstreetmap.org/relation/111457
I find it usefull, when you become display the found pois after searching, like in google.
As example: When I type that in the search field:
I see an poi over every fuel station which was in the result table, and when I click on "more results", the new results would also displayed on the map.
The Problem are similar names on different objects. So I think, the function should restricted on results with only one type of object, like only fuel stations, or only supermarkets