sylvainjule / kirby-locator

A simple map & geolocation field, built on top of open-source services and Mapbox. Kirby 3 and 4.
99 stars 15 forks source link

Store `osm_id` from response #44

Closed S1SYPHOS closed 2 years ago

S1SYPHOS commented 3 years ago

~~hey there, would you be interested in eg a field method toLocationLink() to get the openstreetmap node link for a given POI? or would that be something you don't deem necessary? I'd make an API call to nominatim's reverse function and cache the result, that's about it ..~~

I'd provide a PR if it's of interest, just let me know the best way to pursue this (page method, field method, etc)

// Edit: I propose storing osm_id from the response you get from Nominatim, since it represents the Node ID being used in OpenStreetMap links, eg https://openstreetmap.org/node/OSM_ID - that would save a call to the API using lat / lon to get it ..

Cheers!

sylvainjule commented 2 years ago

Fixed with 5673453 ✓