Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to obtain dynamic google map url (have static map url)

Anyone please help me to obtain a dynamic map url for the following static map url.

http://maps.google.com/maps/api/staticmap?center=59.4,43.4&map_type=SATELLITE&markers=color:blue|label:b|59.4,43.4&sensor=false&size=400x300&zoom=10

like image 783
ALLAN XAVIER Avatar asked Nov 22 '25 14:11

ALLAN XAVIER


1 Answers

There's a list of Google Map parameters at http://mapki.com/wiki/Google_Map_Parameters — too many to copy out and list in an answer here.

Your map would be http://maps.google.com/maps?q=59.4,43.4&t=k&z=10

Note: It's not possible to specify a particular marker in Google Maps, so there's no parameter for a blue marker. And your map_type=SATELLITE in your URL should be maptype=satellite: no underscore and lower-case. The t=k in the Maps URL specifies satellite view.

If you want to embed it in your site, the <iframe> code needed is

<iframe width="400" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?q=59.4,43.4&amp;t=k&amp;ie=UTF8&amp;z=10&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?q=59.4,43.4&amp;t=k&amp;ie=UTF8&amp;z=10&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>

like image 166
Andrew Leach Avatar answered Nov 25 '25 09:11

Andrew Leach