• <legend id='2UOTy'><style id='2UOTy'><dir id='2UOTy'><q id='2UOTy'></q></dir></style></legend>

    1. <small id='2UOTy'></small><noframes id='2UOTy'>

        <bdo id='2UOTy'></bdo><ul id='2UOTy'></ul>
      <i id='2UOTy'><tr id='2UOTy'><dt id='2UOTy'><q id='2UOTy'><span id='2UOTy'><b id='2UOTy'><form id='2UOTy'><ins id='2UOTy'></ins><ul id='2UOTy'></ul><sub id='2UOTy'></sub></form><legend id='2UOTy'></legend><bdo id='2UOTy'><pre id='2UOTy'><center id='2UOTy'></center></pre></bdo></b><th id='2UOTy'></th></span></q></dt></tr></i><div id='2UOTy'><tfoot id='2UOTy'></tfoot><dl id='2UOTy'><fieldset id='2UOTy'></fieldset></dl></div>

        <tfoot id='2UOTy'></tfoot>

        允许手动输入的 Firefox 地理定位提供程序

        时间:2023-09-06

          <tbody id='ks6di'></tbody>
      1. <i id='ks6di'><tr id='ks6di'><dt id='ks6di'><q id='ks6di'><span id='ks6di'><b id='ks6di'><form id='ks6di'><ins id='ks6di'></ins><ul id='ks6di'></ul><sub id='ks6di'></sub></form><legend id='ks6di'></legend><bdo id='ks6di'><pre id='ks6di'><center id='ks6di'></center></pre></bdo></b><th id='ks6di'></th></span></q></dt></tr></i><div id='ks6di'><tfoot id='ks6di'></tfoot><dl id='ks6di'><fieldset id='ks6di'></fieldset></dl></div>
        <tfoot id='ks6di'></tfoot>

            <small id='ks6di'></small><noframes id='ks6di'>

                <bdo id='ks6di'></bdo><ul id='ks6di'></ul>
                <legend id='ks6di'><style id='ks6di'><dir id='ks6di'><q id='ks6di'></q></dir></style></legend>
                  本文介绍了允许手动输入的 Firefox 地理定位提供程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  是否有任何简单的方法来覆盖 geolocation api 的默认行为并且只是硬编码你现在的位置?

                  Are there any easy ways to override the default behaviors of the geolocation api and just hard code your current location?

                  我认为这对于测试和出于隐私原因(提供虚假位置数据)很有用

                  I think this would be useful for testing and for privacy reasons (providing fake location data)

                  我以为有一个附加功能,但我似乎找不到.现在唯一的选择似乎是将 about:config geo.wifi.url 更改为一些替代网络服务,我认为这过于复杂.

                  I thought there was an add on for this but I can't seem to find one. Only option right now seems to be changing the about:config geo.wifi.url to some alternative webservice, which I consider overly complicated.

                  有什么想法吗?

                  谢谢

                  理想场景

                  有人实现了一个显示谷歌地图的插件,我可以选择一个新的默认位置.

                  Somebody implements an add-on where a google map appears and I can pick a new default location.

                  推荐答案

                  geo.wifi.uri 不需要是 web 服务.您也可以使用 file://...

                  The geo.wifi.uri does not need to be a webservice. You can also set it to a local uri with file://...

                  文件应该是一个json文件,内容如下:

                  The file should be a json file with content like this:

                  {"location": {
                                "latitude": 48.777025000000002, 
                                "longitude": 9.1713909999999998, 
                                "accuracy": 10.0}}
                  

                  更新:对于 Firefox 9+,格式已更改:

                  Update: For Firefox 9+, the format has changed:

                  {
                      "status": "OK",
                      "accuracy": 10.0,
                      "location": {"lat": 48.777, "lng": 9.171}
                  }
                  

                  或者您可以将它们结合起来支持两者:

                  Or you can combine them to support both:

                  {
                      "status": "OK",
                      "accuracy": 10.0,
                      "location": {
                          "lat": 48.777,
                          "lng": 9.171,
                          "latitude": 48.777,
                          "longitude": 9.171,
                          "accuracy": 10.0
                      }
                  }
                  

                  更新:看起来手动设置此首选项被假设为 Google 服务的提供商阻止.请参阅 错误 716453更新 2: geo.wifi.uri 不是 geo.wifi.url

                  Update: it looks like manually setting this preference is blocked by the provider assuming the Google service. See Bug 716453 Update 2: geo.wifi.uri not geo.wifi.url

                  这篇关于允许手动输入的 Firefox 地理定位提供程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Chrome 如何知道我的地理位置? 下一篇:使用 google maps API,我们如何使用 map.setCenter 函数

                  相关文章

                  最新文章

                  <small id='TDLrH'></small><noframes id='TDLrH'>

                  <i id='TDLrH'><tr id='TDLrH'><dt id='TDLrH'><q id='TDLrH'><span id='TDLrH'><b id='TDLrH'><form id='TDLrH'><ins id='TDLrH'></ins><ul id='TDLrH'></ul><sub id='TDLrH'></sub></form><legend id='TDLrH'></legend><bdo id='TDLrH'><pre id='TDLrH'><center id='TDLrH'></center></pre></bdo></b><th id='TDLrH'></th></span></q></dt></tr></i><div id='TDLrH'><tfoot id='TDLrH'></tfoot><dl id='TDLrH'><fieldset id='TDLrH'></fieldset></dl></div>

                    <bdo id='TDLrH'></bdo><ul id='TDLrH'></ul>
                  <tfoot id='TDLrH'></tfoot>
                  <legend id='TDLrH'><style id='TDLrH'><dir id='TDLrH'><q id='TDLrH'></q></dir></style></legend>