[英]navigator.geolocation support in web server
this is my first time to give question on stackoverflow , because I can't find the answer.. 这是我第一次对stackoverflow提出问题,因为我找不到答案。
I recently have 3 host (if ok to mention ) : 我最近有3位主持人(如果可以提及):
-- this is the basic code -这是基本代码
if(navigator && navigator.geolocation) {
navigator.geolocation.getCurrentPosition(
function(pos) {
if (is_echo){ return; }
is_echo = true;
success(pos.coords.latitude,pos.coords.longitude);
},
function() {
if (is_echo){ return; }
is_echo = true;
fail();
}
);
} else {
fail();
}
This code has several feedback: 这段代码有几个反馈:
in first and second works. 在第一和第二作品中。 (ok with android galaxy tab with gps enabled ) Why on third does not work. (可以在启用了gps的android galaxy标签下正常运行)为什么在第三个不起作用。 (always fail in android galaxy tab with gps enabled) (始终在启用gps的android galaxy标签中失败)
Is navigator require php mod mod_geoip2 导航器是否需要php mod mod_geoip2
if so , I have search that hostgat**.com does not support it in shared. 如果是这样,我搜索到hostgat **。com不支持共享。 why working. 为什么工作。 I am sorry for messy question, I am all new in geolocation. 对于麻烦的问题,我感到很抱歉,我在地理位置方面是全新的。
Thank you for stackoverflow has provide us with ... excellent samples... 谢谢您stackoverflow为我们提供了...优秀的样本...
Luckman R 拉克曼河
if(navigator && navigator.geolocation) {
navigator.geolocation.getCurrentPosition(
function(pos) {
if (is_echo){ return; }
is_echo = true;
success(pos.coords.latitude,pos.coords.longitude);
},
function() {
if (is_echo){ return; }
is_echo = true;
fail();
},{
enableHighAccuracy: true
,timeout : 5000
}
);
} else {
fail();
}
Hi, Geolocation with android devices have some problem always just try with this code i have added two lines might work..if not reply back.. 嗨,地理位置与android设备总是有一些问题,总是尝试用此代码我添加了两行可能会工作..如果不回复
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.