JS 获取经纬度的实现方法
<!- Copyright (c) 2009 Google Inc. Usted es libre de copiar y usar esta muestra. La licencia se puede encontrar aquí: http://code.google.com/apis/ajaxsearch/faq/#license-> <! Doctype html público "-// w3c // dtd xhtml 1.0 Strict // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns = "http://www.w3.org/1999/xhtml" xmlns: v = "urn: schemas-microsoft-com: vml" http-equiv = "content-type" content = "text/html; charset = utf-8"/> <title> Google Maps API Sample </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"); </style> <script src = "http://maps.google.com/maps?file=api&v=2&key=abqiaaaa1xbmidxx_btcy2_fkph06rragtyh6uml8madna0ykuwnna8vnxqetaucfkyrr6owbovxn7tdah5q" " type = "text/javaScript"> </script> <script src = "http://www.google.com/uds/api?file=uds.js&v=1.0" type = "text/javascript"> </script> <script src = "http:/wwww.google.com/uds/solutions/localsearch/gmlsearch.jsearch. type = "text/javascript"> </script> function inicialize () {if (gbrowserisCompatible ()) {// crea y centra un map36.1019825, 103.6055232) var map = new GMAP2 (document.getElementById ("MAP_CANVAS")); MAP.SetCenter (nuevo Glatlng (36.1019825, 103.6055232), 13); MAP.AddControl (new GlarGeMapControl ()); MAP.AddControl (new GMapTyPeControl ()); // Binde un control de búsqueda al mapa, suprima la lista de resultados MAP.AddControl (new Google.maps.localSearch (), new GControlPosition (G_anchor_Bottom_Right, nuevo GSize (10,20))); }} Gsearch.setOnloadCallback (inicialize); </script> </head> <body onload = "inicialize ()" onUnload = "gunload ()" style = "Font-Family: Arial; Border: 0 None;"> <Div ID = "MAP_CANVAS"> </div> </body> </html>以上这篇 JS 获取经纬度的实现方法就是小编分享给大家的全部内容了 , 希望能给大家一个参考 也希望大家多多支持武林网。