不知道是不是應(yīng)該注冊(cè)這個(gè)API?2.注冊(cè)這個(gè)API后的密鑰怎么在下面的代碼中使用?<!--Google?Maps-->
<script?src="http://maps.google.com/maps/api/js"></script>
<script>
????function?init_map()?{
????????var?var_location?=?new?google.maps.LatLng(40.725118,?-73.997699);
????????var?var_mapoptions?=?{
????????????center:?var_location,
????????????zoom:?14
????????};
????????var?var_marker?=?new?google.maps.Marker({
????????????position:?var_location,
????????????map:?var_map,
????????????title:?"New?York"
????????});
????????var?var_map?=?new?google.maps.Map(document.getElementById("map-container"),
????????????????var_mapoptions);
????????var_marker.setMap(var_map);
????}
????google.maps.event.addDomListener(window,?'load',?init_map);
</script>
添加回答
舉報(bào)
0/150
提交
取消