草庐IT

javascript - 如何按经纬度设置谷歌地图标记并提供信息气泡

googlemapsapi提供的示例代码如下vargeocoder;varmap;functioninitialize(){geocoder=newgoogle.maps.Geocoder();varlatlng=newgoogle.maps.LatLng(40.77627,-73.910965);varmyOptions={zoom:8,center:latlng,mapTypeId:google.maps.MapTypeId.ROADMAP}map=newgoogle.maps.Map(document.getElementById("map_canvas"),myOptions)