js 获取经纬度的实现方法
js获取经纬度的实现方法
<!--
copyright(c)2009Googleinc.
Youarefreetocopyandusethissample.
Licensecanbefoundhere:http://code.google.com/apis/ajaxsearch/faq/#license
-->
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml"xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<metahttp-equiv="content-type"content="text/html;charset=utf-8"/>
<title>GoogleMapsAPISample</title>
<styletype="text/css">
@importurl("http://www.google.com/uds/css/gsearch.css");
@importurl("http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css");
</style>
<scriptsrc="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA1XbMiDxx_BTCY2_FkPh06RRaGTYH6UMl8mADNa0YKuWNNa8VNxQEerTAUcfkyrr6OwBovxn7TDAH5Q"
type="text/javascript"></script>
<scriptsrc="http://www.google.com/uds/api?file=uds.js&v=1.0"type="text/javascript"></script>
<scriptsrc="http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js"type="text/javascript"></script>
functioninitialize(){
if(GBrowserIsCompatible()){
//CreateandCenteraMap36.1019825,103.6055232)
varmap=newGMap2(document.getElementById("map_canvas"));
map.setCenter(newGLatLng(36.1019825,103.6055232),13);
map.addControl(newGLargeMapControl());
map.addControl(newGMapTypeControl());
//bindasearchcontroltothemap,suppressresultlist
map.addControl(newgoogle.maps.LocalSearch(),newGControlPosition(G_ANCHOR_BOTTOM_RIGHT,newGSize(10,20)));
}
}
GSearch.setOnLoadCallback(initialize);
</script>
</head>
<bodyonload="initialize()"onunload="GUnload()"style="font-family:Arial;border:0none;">
<divid="map_canvas"style="width:500px;height:300px"></div>
</body>
</html>
以上这篇js获取经纬度的实现方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持毛票票。
热门推荐
1 训练狗狗憋尿
2 狗狗追踪训练
3 狗狗训练要多少钱
5 深圳狗狗训练
6 训练狗狗唤回
7 狗狗叫怎么训练
8 狗狗训练班
10 狗狗社会化训练
11 狗狗叫回训练
12 广州狗狗训练学校
13 狗狗训练躺下
14 狗狗随行训练
15 训练狗狗巡回
16 狗狗要怎么训练
17 狗狗喂食训练
18 训练狗狗躺下