“我的位置”在Google Maps JavaScript API中 [英] "My Location" in Google Maps javascript API

查看:104
本文介绍了“我的位置”在Google Maps JavaScript API中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用自己的网络应用程序中 Google地图上的我的位置按钮使用javascript api?

我已阅读关于在这里添加控件 Google Maps Javascript API V3控件,但我还没有找到任何关于我的位置控制的信息。

解决方案

目前Google Maps API v3中没有地理位置按钮。但是你自己实现一个并不困难。

有关实施地理位置的信息可以在 Google Maps JavaScript API文档

如果要将地理位置按钮添加为地图控件,请阅读< 自定义控件部分


Is there a way to use the "My location" button that exist on Google Maps in your own webbapplication using the javascript api?
I have read about adding controls here Google Maps Javascript API V3 Controls but I haven't found anything about the "My locaton" control.

解决方案

There's currently no geolocation button in Google Maps API v3. But it's not difficult to implement one yourself.

Information about implementing geolocation can be found in the Google Maps Javascript API documentation.

If you want to add a geolocation button as a map control, read the Custom Controls section of the Google Maps documentation.

这篇关于“我的位置”在Google Maps JavaScript API中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆