为什么html5地理位置无法获得结果? [英] why the html5 geolocation fails to get results?

查看:114
本文介绍了为什么html5地理位置无法获得结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HTML 5地理位置的工作原理是什么?它是否根据IP地址猜测位置?我猜这不需要GPS功能的设备?我在我的笔记本电脑上没有GPS。



我一直试图在 w3schools geolocation tester / demo and 但我要么获取位置信息不可用失败。这可能是什么原因?



注意:我通过USB Tethering连接到互联网。

解决方案

浏览器如何确定地理位置取决于它。如果它可以访问GPS设备,则可以使用该设备。否则它可能会做GSM三角测量,反向IP地理定位,WiFi网络数据库查找或其他任何可以或不可以做的事情。



这取决于您的浏览器/操作系统不保证工作。

On what basis does HTML 5 geolocation work ? Does it guess the location on the basis of IP address ? I guess it doesn't need a GPS enabled device ? I do not have GPS on my laptop.

I have been trying to test my location using HTML5 geolocation on w3schools geolocation tester/demo and html5demos but I either get location information unavailable or failed. What could be the reason for this ?

Note : I am connected to internet via USB Tethering.

解决方案

How exactly the browser does geolocation is up to it. If it has access to a GPS device, it may use that. Otherwise it may do GSM triangulation, reverse IP geolocation, WiFi network database lookups or anything else it can or can't do.

It depends on your browser/OS and is not guaranteed to work.

这篇关于为什么html5地理位置无法获得结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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