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

    • <bdo id='qcgVZ'></bdo><ul id='qcgVZ'></ul>

    <legend id='qcgVZ'><style id='qcgVZ'><dir id='qcgVZ'><q id='qcgVZ'></q></dir></style></legend>

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

      1. 全球地图图块在缩放级别 19 后消失

        时间:2023-08-09

        <tfoot id='fuK36'></tfoot>

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

          <tbody id='fuK36'></tbody>

          <legend id='fuK36'><style id='fuK36'><dir id='fuK36'><q id='fuK36'></q></dir></style></legend>

          1. <i id='fuK36'><tr id='fuK36'><dt id='fuK36'><q id='fuK36'><span id='fuK36'><b id='fuK36'><form id='fuK36'><ins id='fuK36'></ins><ul id='fuK36'></ul><sub id='fuK36'></sub></form><legend id='fuK36'></legend><bdo id='fuK36'><pre id='fuK36'><center id='fuK36'></center></pre></bdo></b><th id='fuK36'></th></span></q></dt></tr></i><div id='fuK36'><tfoot id='fuK36'></tfoot><dl id='fuK36'><fieldset id='fuK36'></fieldset></dl></div>
                • <bdo id='fuK36'></bdo><ul id='fuK36'></ul>
                • 本文介绍了全球地图图块在缩放级别 19 后消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我将 OpenStreetMap 与

                  <小时>

                  编辑:

                  //加载地图this.map_ = L.map($(selector)[0], {中央: [48.8459382,2.2863024,],最大缩放:24,缩放:20,});

                  解决方案

                  我猜你用过map.options.maxZoom 设置为高数字,让用户缩放以查看您的室内图像细节.

                  但是,OSM 磁贴在缩放级别 19 之后不可用,因此服务器返回 404 错误,并且您的磁贴被错误磁贴替换(或者如果未指定,则只是灰色磁贴).

                  在这种情况下,您只需在 Tile Layer 上使用这 2 个选项(一起)来告诉 Leaflet 重新使用较低缩放比例的图块并展开它们:

                  • maxNativeZoom 设置为 19.
                  • maxZoom 设置为您需要的任何值,并且相等到 map.options.maxZoom 如果指定.

                  L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png',{maxNativeZoom: 19,//OSM 最大可用缩放为 19.maxZoom: 22//匹配地图 maxZoom,或者不定义 map.options.maxZoom.}).addTo(地图);

                  演示:http://jsfiddle.net/ve2huzxw/68/

                  I use OpenStreetMap with Leaflet.js.

                  I have a map with an indoor picture on it. The problem is when I zoom in, streets disapears. Do you know anything that can solve this plz? Tricks or tips!


                  EDIT:

                  // Load the Map
                  this.map_ = L.map($(selector)[0], {
                      center: [
                        48.8459382,
                        2.2863024,
                      ],
                  
                      maxZoom: 24,
                      zoom: 20,
                  });
                  

                  解决方案

                  I guess you have used map.options.maxZoom at a high number to let the user zoom to see your indoor image details.

                  However, OSM tiles are not available past zoom level 19, so the server returns 404 errors and your tiles are replaced by the Error Tile (or just a grey tile if not specified).

                  In that case, you would simply need to use these 2 options (together) on Tile Layer to tell Leaflet to re-use tiles from a lower zoom and to expand them:

                  • maxNativeZoom set at 19.
                  • maxZoom set at whatever you need, and equal to map.options.maxZoom if specified.

                  L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
                      maxNativeZoom: 19, // OSM max available zoom is at 19.
                      maxZoom: 22 // Match the map maxZoom, or leave map.options.maxZoom undefined.
                  }).addTo(map);
                  

                  Demo: http://jsfiddle.net/ve2huzxw/68/

                  这篇关于全球地图图块在缩放级别 19 后消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:使用复选框而不是单选按钮来控制传单层? 下一篇:Leaflet _ ReactJS - 在哪里可以找到 invalidateSize 属性

                  相关文章

                  最新文章

                      <bdo id='wBLwp'></bdo><ul id='wBLwp'></ul>
                  1. <tfoot id='wBLwp'></tfoot>
                  2. <legend id='wBLwp'><style id='wBLwp'><dir id='wBLwp'><q id='wBLwp'></q></dir></style></legend>

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

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