Google maps API - 客户当前位置的中心地图
本文介绍了Google maps API - 客户当前位置的中心地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经查看了这个问题被问到的各种其他时间,但我不能完全指出我哪里出错了,这是我的代码:
I've looked at the various other times this question has been asked but I can't quite put a finger on where I'm going wrong, here's my code:
它最初将中心设置为myLatlng1,而底部将其设置为用户当前位置的代码没有做任何事情,有什么想法吗?
It originally sets the center to myLatlng1, and the code at the bottom to set it to the user's current location doesn't do anything, any ideas?
提前致谢.
推荐答案
尝试使用以下代码获取用户当前位置(GEOLOCATION):
Try using the below code to get the user's current location (GEOLOCATION):
为了展示一个例子,我删除了你的 php 代码.检查这个 JSFiddle
For showing an example, I've removed your php code. Check this JSFiddle
希望你能理解.
这篇关于Google maps API - 客户当前位置的中心地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!