If you have the URL to a Google Maps link, you can easily get the latitude and longitude data from it.
1. Go to the Google Maps link and add a command to Extract the page URL.
Or, Select the link to the Google Maps page from another page, and Extract the src attribute.
2. Enable the use regex box on the Extract command.
3. In the "Use regex" box, input the correct regex expression to extract the latitude data. If the latitude and longitude in the URL is in the format https://www.google.ca/maps/@43.6474528,-79.3799409,14.78z, the following regex should work (for other formats, please see below):
\@(-?[\d\.]*)
4. Repeat steps 1–3 for the longitude data, but use this expression (if the latitude and longitude in the URL is in the format https://www.google.ca/maps/@43.6474528,-79.3799409,14.78z) for step 3 instead:
\@[-?\d\.]*\,([-?\d\.]*)
Finding the correct RegEx expression for your map's URL
If the latitude and longitude in the URL is preceded by an "@" symbol, (e.g. https://www.google.ca/maps/@43.6474528,-79.3799409,14.78z):
- Latitude: \@(-?[\d\.]*)
- Longitude: \@[-?\d\.]*\,([-?\d\.]*)
If the latitude and longitude in the URL is preceded by "ll=" (e.g. https://maps.google.com/maps?ll=43.6474528,-79.3799409,&z=16&t=m&hl=en-US&gl=US&mapclient=apiv3):
- Latitude: ll=(-?[\d\.]*)
- Longitude: ll=[-?\d\.]*\,([-?\d\.]*)
If you're still having trouble to find the right RegEx for your website, please contact us!