JS獲取經緯度的實現方法
<! - 版權(C)2009 Google Inc。您可以免費複製和使用此樣本。許可可以在此處找到:http://code.google.com/apis/ajaxsearch/faq/#license-> <! <! <html xmlns =“ http://www.w3.org/1999/xhtml” xmlns:v =“ urn:schemas-microsoft-com:vml”> <head> <head> <head> <meta http-equiv =“示例</title> <style type =“ text/css”> @import url(“ http://www.google.com/uds/css/gsearch.css”); @import url(“ http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css”);在type =“ text/javascript”> </script> <script src =“ http://www.google.com/uds/api?file=uds.js&v=1.0” type =“ text/javascript”> </javascript“> </script> </script> </script> <</script> <</script src =” type =“ text/javaScript”> </script>函數inditialize(){if(gbrowserisCompaible()){//創建和中心A MAP36.1019825,103.6055232)var map = new Gmap2(document.getElementByid(getElementByid) map.setCenter(新Glatlng(36.1019825,103.6055232),13); map.AddControl(new GlargeMapControl()); map.AddControl(new Gmaptypecontrol()); //將搜索控件綁定到地圖,抑制結果列表map.addcontrol(new Google.maps.localsearch(),新的gcontrolposition(g_anchor_bottom_right,new GSize(10,20))); }} gsearch.setonloadCallback(initialize); </script> </head> <body onload =“ pritialize()” onunload =“ gunload()” style =“ font-family:arial; arial; border; border;“ none;”> <div id =“ map_canvas”> </div> </div> </div> </div> </body> </html> </html>以上這篇js獲取經緯度的實現方法就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持武林網。 ,也希望大家多多支持武林網。