diff --git a/spatial-coordinate-systems/src/urls.rs b/spatial-coordinate-systems/src/urls.rs index 772a21d..51080e9 100644 --- a/spatial-coordinate-systems/src/urls.rs +++ b/spatial-coordinate-systems/src/urls.rs @@ -85,6 +85,14 @@ impl CoordinateUrls { return Ok(("", ret)); } } + + // From: https://help.parsehub.com/hc/en-us/articles/226061627-Scrape-latitude-and-longitude-data-from-a-Google-Maps-link + // https://maps.google.com/maps?ll=43.6474528,-79.3799409,&z=16&t=m&hl=en-US&gl=US&mapclient=apiv3): + if key == "ll" { + if let Ok((_str, ret)) = LatLon::parse(value.as_ref()) { + return Ok(("", ret)); + } + } } context("latlon not found in url", fail)(i) @@ -296,5 +304,11 @@ mod tests { 35.7224075, -78.4170755 ); + + p!( + "https://maps.google.com/maps?ll=43.6474528,-79.3799409,&z=16&t=m&hl=en-US&gl=US&mapclient=apiv3):", + 43.6474528, + -79.3799409 + ); } }