有没有任何浏览器(Chrome,Firefox)插件,允许模拟地理位置? [英] Is there any browser (Chrome, Firefox) plugin that allows to simulate geo location?
本文介绍了有没有任何浏览器(Chrome,Firefox)插件,允许模拟地理位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
geo.wifi.uri
来完成此操作,例如Firefox的单元测试呢。请参阅: - http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/geolocation/geolocation_common.js?force=1 < a>
- http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/geolocation/network_geolocation.sjs?force=1 - httpd.js 脚本响应
geo.wifi的请求.uri
用于测试。
I need to test web application that extensively uses geo location api (getCurrentPosition, watchPosition). Is there any browser (Chrome, Firefox) plugin that allows to simulate geo location?
解决方案
If I understood the question correctly and you're asking for a way to fake geolocation responses for your web app, you might be able to do this in Firefox by overriding the geo.wifi.uri
in the prefs, like Firefox's unit tests do. See:
- http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/geolocation/geolocation_common.js?force=1
- http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/geolocation/network_geolocation.sjs?force=1 - the httpd.js script responding to requests of the
geo.wifi.uri
used in the tests.
这篇关于有没有任何浏览器(Chrome,Firefox)插件,允许模拟地理位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文