We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21fcadf commit 494868bCopy full SHA for 494868b
src/scripts/js/urls/googlemaps.js
@@ -21,8 +21,10 @@ function universalToGMUrl(universal) {
21
// parse the Google Maps url to the universal map location representation
22
function GMUrlToUniversal(url) {
23
// check if maps are in satellite mode, or not
24
+ // based on https://mstickles.wordpress.com/2015/06/12/gmaps-urls-options/
25
+ // the URL should be parsed more thoroughly if we wanted to do this properly, but this seems to work fine for our use case
26
var type = "basic";
- if (url.indexOf("!3m1!1e3") > 0) {
27
+ if (RegExp("!3m.!1e3").test(url)) {
28
type = "satellite";
29
}
30
0 commit comments