包括这个jQuery插件的用户访问你的网页的位置该插件显示完整的地址,纬度和logitude的 -也显示在谷歌地图的位置。



jQuery插件得到你的用户地理位置 - 谷歌地图API v3的位置 下载包    jQuery插件得到你的用户地理位置 - 谷歌地图API v3的位置 演示      



使用方法:

下载包包含两个文件- geolocation.html和插件文件geolocation.min.js。 包括jQuery库,谷歌API库和插件,您的<BODY>结束标记的HTML

<body>
  ...
  ...
  <script src="http://code.jquery.com/jquery-latest.js"></script>
  <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
  <script src="./geolocation.min.js"></script>
</body>

创建一个id 为location_details 的div。这个div将显示位置的详细信息和地址。另一个div id - map_canvas将显示在谷歌地图的位置。

<div id="location_details" class="location_details_css" ></div>
<div id="map_canvas" class="map_canvas_css" ></div>

 

相关文章:

  • 2021-11-29
  • 2022-12-23
  • 2021-12-18
  • 2021-11-23
  • 2021-12-03
  • 2022-12-23
猜你喜欢
  • 2021-11-23
  • 2021-11-11
  • 2021-10-10
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
相关资源
相似解决方案