JS 获取经纬度的实现方法
<! - Copyright (C) 2009 Google Inc. Vous êtes libre de copier et d'utiliser cet échantillon. La licence peut être trouvée ici: 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" http-equiv = "content-type" contenu = "text / html; charset = utf-8" /> <itle> google maps api exemple </ 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_fkph06ragtyh6uml8madna0ykuwnna8vnxqeertaucfkyrr6owbovxn7tdah5q" type = "text / javascript"> </ script> <script src = "http://www.google.com/uds/api?file=uds.js&v=1.0" type = "text / javascrip type = "text / javascript"> </ script> function initialize () {if (gbrowseRisCompatible ()) {// Créer et centrer une MAP36.1019825, 103.6055232) var map = new GMAP2 (document.getElementByid ("Map_Canvas")); map.setCenter (New Glatlng (36.1019825, 103.6055232), 13); map.addControl (new GLargeMapControl ()); map.addControl (new gmapTypeControl ()); // lie un contrôle de recherche à la carte, supprimez la liste des résultats map.addControl (new Google.maps.Localsearch (), new GControlposition (g_anchor_bottom_right, new GSize (10,20))); }} Gsearch.setOnloadCallback (initialize); </ script> </ head> <body onload = "initialize ()" onunload = "gunload ()" style = "font-family: arial; border: 0 non;"> <div id = "map_canvas"> </div> </ body> </html>以上这篇 JS 获取经纬度的实现方法就是小编分享给大家的全部内容了 , 希望能给大家一个参考 , 也希望大家多多支持武林网。