javascript - Google maps link from greasemonkey default zoom -
something seems have changed on google maps changed default zoom. i've tried adding zoom=17 , z=17, nothing seems change.
i'm creating hyperlink on page using following url & query
"https://maps.google.com/?zoom=17&q=" +myaddress.replace(/ /g, '+');
in past it's worked fine no matter address used in query. wondering may have changed , if need work around way.
google maps, now, not zoom past z=13 unless latitude , longitude supplied. eg: &ll=98.414257,-21.727585.
as scripter, makes task bit more involved; here pseudocode approach work:
open map page before, flag (custom url param or
gm_setvalue) first opened script.set script run on google maps pages.
on flagged google maps pages:
- grab share link.
- change
zparameter only, eg&z=17. - make sure flag cleared.
location.replace()modified share link
alternatively, more durable strategy switch using the google maps api.
Comments
Post a Comment