I’m trying to make a homepage on my mobile website where a google map of my current position stays in the background while icons float over it. The only way to do this is to use a static image of the map, but I can’t figure out a way to pull out a static map of my current position. Anyone know how to do this?
Share
Not sure that’s “the only way” to do what you want. But if you want to get a static map of your current position, you can do the following:
navigator.geolocation(available on newer web browsers)Here is code (run by
<body onLoad="setBgMap()">) which will set a page’s background image to a map of your current position: