thekid / dialog

Dialog photoblog
2 stars 1 forks source link

Aggregate coordinates from Google Maps links #3

Closed thekid closed 1 year ago

thekid commented 1 year ago

This PR aggregates latitute, longitude and zoom factor from Google Maps links. This is done by fetching the redirect location and matching the information from it:

$ curl -si 'https://goo.gl/maps/mnsteNxpf9iPAmEq6' | grep ^location
location: https://www.google.de/maps/place/Norway/@64.2867183,8.7810941,5z/data=...?shorturl=1
#                                          ^^^^^^  ^^^^^^^^^^ ^^^^^^^^^ ^
#                                          Name    Latitude   Longitude Zoom

These could be used to draw markers onto an embedded map.