JS 获取经纬度的实现方法
<!- Copyright (C) 2009 Google Inc. Sie können dieses Beispiel kopieren und verwenden. Lizenz finden Sie hier: http://code.google.com/apis/ajaxsearch/faq/#license-> <! DocType html public "-// 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"> <head> <meta http-äquiv = "content-type" content = "text/html; charset = utf-8"/> <title> Google Maps API-Beispiel </title> <style type = "text/css"> @import url ("http://www.google.com/uds/css/gSearch.css.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_FkPh06RRaGTYH6UMl8mADNa0YKuWNNa8VNxQEerTAUcfkyrr6OwBovxn7TDAH5Q" 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://www.google.com/uds/solutions/localsearch/gmlocalsearch.js" type = "text/javaScript"> </script> Funktion initialize () {if (gbrowseriscompatible ()) {// zentrieren A MAP36.1019825, 103.6055232) var map = new gmap2 (document.getElementById ("map_canvas")); MAP.SetCenter (New Glatlng (36.1019825, 103,6055232), 13); map.addControl (neue GlargemapControl ()); map.addControl (neue gmaptypecontrol ()); // Binden Sie eine Suchregelung an die Karte, unterdrücken Sie die Ergebnisliste map.addControl (neue google.maps.localsearch (), neue gControlposition (g_anchor_bottom_right, new gSize (10,20)); }} Gsearch.setonloadCallback (initialize); </script> </head> <body onload = "initialize ()" onunload = "Gunload ()" style = "font-familie: arial; border: 0 keine;"> <div id = "map_canvas"> </div> </body> </html>以上这篇 js 获取经纬度的实现方法就是小编分享给大家的全部内容了 , 希望能给大家一个参考 , 也希望大家多多支持武林网。 也希望大家多多支持武林网。 也希望大家多多支持武林网。