-
Notifications
You must be signed in to change notification settings - Fork 34
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
poi search #394
Merged
Merged
poi search #394
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…istanceFormat to reduce jest problems
ZeroGxMax
pushed a commit
to minhhpkp/graphhopper-maps
that referenced
this pull request
Nov 12, 2024
* poi search on every key stroke * new autocomplete item, better usability * fix poi search without location keywords * proper marker Select * change scale, not color * keyboard support * show popup and POI being used in route * do not zoom if no location; fix bbox if single point; minor layout fix * translation; move AddressParseResult into separate class and inject distanceFormat to reduce jest problems * fetch more information from OSM * minor fixes * use overpass instead osm * fetch on click; more i18n; minor fixes * reorder * one more exclusion * added a few more POIs * photon does not know public_transport:station (?) * rename * use overpass API * use out center and let overpass do the work; fix a few bugs * translate 'nearby' * make 'AND NOT' possible to exclude military airports * fix a few POI queries and i18n * allow generic query in simplified 'photon' format * workaround for initial search * bug fix in merge * support simple 'or' and 'and' queries with 'not'. use more overpass wizard query style * special case for all value query * avoid POI layer setup in most cases * minor cosmetics * simplify and avoid hack. UX is more clear too. * formatting * minor fix
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Can be tried here.
This PR adds one item in the autocomplete for certain "trigger phrases" like "restaurants hamburg" or just "restaurant". If you use just "restaurant" the current map view will be searched.
Of course many more trigger phrases are implemented like bank, airport, shop, super market, toilet, charging station, gas station, atm, bus stops, hotel, police, hospital, pharmacies, museum, parking, park, playgrounds, school, post box, post, public transit, train station. Let us know if you'd have expected certain phrases triggering a poi search item. Until then you can use an OSM key-value pair as search phrase like
shop=bakery
to get the specific POIs that you want.Clicking on this item will give you a list of items on the map:
Which you can click, then read more information about it and use the location in the routing.
And if you move the map and want to search the same POI query in the new area, just use the query "restaurant" without the location words, i.e. a new item "Restaurants nearby" will appear. Click that. If you move the map again, just click the input and the previous suggestions will appear and you can click it again to trigger the search for the current view.
a=b c=d
for simple OR-queries,a=b and c=d
for simple AND-queries or in combination with nota=b and c!=d
. Examples:playground=* in hoyerswerda
amenity=restaurant and wheelchair=yes in berlin
amenity=bar and smoking=no nearby