有没有任何浏览器(Chrome,Firefox)插件​​,允许模拟地理位置? [英] Is there any browser (Chrome, Firefox) plugin that allows to simulate geo location?

查看:453
本文介绍了有没有任何浏览器(Chrome,Firefox)插件​​,允许模拟地理位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要测试广泛使用地理位置api(getCurrentPosition,watchPosition)的web应用程序。是否有任何浏览器(Chrome,Firefox)的插件,允许模拟地理位置?

要求为您的Web应用程序伪造地理位置响应,您可以通过在首选项中重写 geo.wifi.uri 来完成此操作,例如Firefox的单元测试呢。请参阅:


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:

这篇关于有没有任何浏览器(Chrome,Firefox)插件​​,允许模拟地理位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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