“模板:Test”的版本间的差异
来自Jamesqi
(创建新页面为 '<html> <script src="http://ditu.google.cn/maps?file=api&v=2.x&key=ABQIAAAAsec4RV8oAB2Dy0WfBAQeBRSeF8OSOK12RnhJK901ydzsR0THTBRE8kQzmJpyswMlPPfG9sTs3NQYLA&hl=zh-CN" ty…') |
|||
第1行: | 第1行: | ||
<html> | <html> | ||
+ | <script type="text/javascript"> | ||
+ | var address = "湖北武汉"; | ||
+ | var phone = "13294193726"; | ||
+ | </script> | ||
+ | |||
<script src="http://ditu.google.cn/maps?file=api&v=2.x&key=ABQIAAAAsec4RV8oAB2Dy0WfBAQeBRSeF8OSOK12RnhJK901ydzsR0THTBRE8kQzmJpyswMlPPfG9sTs3NQYLA&hl=zh-CN" type="text/javascript"></script> | <script src="http://ditu.google.cn/maps?file=api&v=2.x&key=ABQIAAAAsec4RV8oAB2Dy0WfBAQeBRSeF8OSOK12RnhJK901ydzsR0THTBRE8kQzmJpyswMlPPfG9sTs3NQYLA&hl=zh-CN" type="text/javascript"></script> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
第14行: | 第19行: | ||
} | } | ||
− | function showAddress( | + | function showAddress(address) { |
if (geocoder) { | if (geocoder) { | ||
geocoder.getLatLng( | geocoder.getLatLng( | ||
− | + | address, | |
function(point) { | function(point) { | ||
if (!point) { | if (!point) { | ||
− | alert("不能解析: " + | + | alert("不能解析: " + address); |
} else { | } else { | ||
map.setCenter(point, 13); | map.setCenter(point, 13); | ||
var marker = new GMarker(point); | var marker = new GMarker(point); | ||
map.addOverlay(marker); | map.addOverlay(marker); | ||
− | marker.openInfoWindowHtml( | + | marker.openInfoWindowHtml("地址"+address+"电话"+phone); |
} | } | ||
} | } | ||
第34行: | 第39行: | ||
<body onload="initialize()" onunload="GUnload()"> | <body onload="initialize()" onunload="GUnload()"> | ||
− | <div id="map_canvas" style="width: 500px; height: 300px"></div> | + | <div id="map_canvas" style="width: 500px; height: 300px">正在载入地图,请稍等...</div> |
</body> | </body> | ||
</html> | </html> |
2009年7月29日 (三) 00:01的版本
正在载入地图,请稍等...