Published on

Find out what coordinates are in a Google Maps link

Authors

So you have a link to Google Maps, which points to a location you want to save to Notion.

As a first precaution, if you want the exact latitude and longitude of a location, it would be best to use another method or another tool, since the coordinates from the url take zoom and pan into account, so sometimes you get a slightly different coordinate for the same location.

So for example, the link to the Eiffel Tower will be like this:

https://www.google.com/maps/place/Eiffel+Tower,+Paris,+France/@48.8538427,2.2821533...

If I zoom out a little bit, the link now will be:

https://www.google.com/maps/place/Eiffel+Tower,+Paris,+France/@48.8541049,2.280812...

There is a slight difference between the two, but it is so small that it can be ignored.

Now to Notion

Within your database, you will need three columns, "Google Maps Link" of type text, "Latitude" and "Longitude" of type formula.

step-1

Paste the link in the "Google Maps Link" column.

Put this in the "Latitude" formula:

replace(replace(replace(replace(prop("Google Maps Link"), ".*/@", ""), "/data=/*", ""), "(,[^,]*)$", ""), ",.*", "")

Put this in the "Longitude" formula:

replace(replace(replace(replace(prop("Google Maps Link"), ".*/@", ""), "/data=/*", ""), "(,[^,]*)$", ""), ".*,", "")
step-2

What this formula does is remove all the text that we are not interested in, starting from the beginning of the url, then from the forward coordinates and finally separating both coordinates in two, which are separated by a comma.

You can now paste links and you will receive the coordinates immediately and be able to use those coordinates with Notion Maps.