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

poi search #394

Merged
merged 41 commits into from
Aug 12, 2024
Merged

poi search #394

merged 41 commits into from
Aug 12, 2024

Conversation

karussell
Copy link
Member

@karussell karussell commented Jun 4, 2024

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.

image

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:

image

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.

  • replace reverse geocoding request with one overpass api (instead of fetching the info for every single POI)
  • translate 'nearby'
  • arbitrary key=value queries like a=b c=d for simple OR-queries, a=b and c=d for simple AND-queries or in combination with not a=b and c!=d. Examples:
    • playground=* in hoyerswerda
    • amenity=restaurant and wheelchair=yes in berlin
    • amenity=bar and smoking=no nearby
  • cannot use alternative overpass API like https://overpass.kumi.systems as it is a lot slower (>20s instead of 1s)

@karussell karussell added the enhancement New feature or request label Aug 10, 2024
@karussell karussell added this to the 0.7 milestone Aug 12, 2024
@karussell karussell merged commit b8b4cd5 into master Aug 12, 2024
2 checks passed
@karussell karussell deleted the integrated_poi_search branch August 12, 2024 15:02
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
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant