应用Google Maps JavaScript API

<html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <mce:script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true" mce_src="http://maps.google.com/maps/api/js?sensor=true"></mce:script> <mce:script type="text/javascript"><!-- function initialize(){ var latlng = new google.maps.LatLng(30.694, 114.403); var myOptions = { zoom:15, center:latlng, mapTypeId:google.maps.MapTypeId.HYBRID }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); } // --></mce:script> </head> <body onload="initialize()"> <div id="map_canvas" style="width:50%; height:50%"> </div> </body> </html>

zoom:控制地图被放大的等级

new google.maps.LatLng(30.694,114.403);:你想看的地方的经纬度

……

参考:http://code.google.com/intl/zh-CN/apis/maps/documentation/javascript/tutorial.html#LatLng

你可能感兴趣的:(应用Google Maps JavaScript API)