Showing posts with label Google Map API. Show all posts
Showing posts with label Google Map API. Show all posts

Thursday, August 25, 2011

Google Map API Exercise 1: display a static google map via URL

这是一张以俺家为中心的static map,center的经纬度是通过javascript:void(prompt('',gApplication.getMap().getCenter()));获取的。其代码如下:

<img src=http://maps.googleapis.com/maps/api/staticmap?center=42.286959,-71.765538&zoom=17&size=512x512&maptype=satellite&markers=icon:http://bit.ly/pu5LFb|42.286959,-71.765538&sensor=true>

其中被shorten的地址(http://bit.ly/pu5LFb)的原地址为:http://chart.apis.google.com/chart?chst=d_map_spin&chld=0.84|30|FFFF88|10|_|%E4%BF%BA%E5%AE%B6