• <small id='7RnmA'></small><noframes id='7RnmA'>

      <tfoot id='7RnmA'></tfoot>

        <legend id='7RnmA'><style id='7RnmA'><dir id='7RnmA'><q id='7RnmA'></q></dir></style></legend>

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

        LeafletJS:如何删除缩放控件

        时间:2023-08-09
        <legend id='pFc3J'><style id='pFc3J'><dir id='pFc3J'><q id='pFc3J'></q></dir></style></legend>
        • <tfoot id='pFc3J'></tfoot>
            • <bdo id='pFc3J'></bdo><ul id='pFc3J'></ul>

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

                  <tbody id='pFc3J'></tbody>

                1. <i id='pFc3J'><tr id='pFc3J'><dt id='pFc3J'><q id='pFc3J'><span id='pFc3J'><b id='pFc3J'><form id='pFc3J'><ins id='pFc3J'></ins><ul id='pFc3J'></ul><sub id='pFc3J'></sub></form><legend id='pFc3J'></legend><bdo id='pFc3J'><pre id='pFc3J'><center id='pFc3J'></center></pre></bdo></b><th id='pFc3J'></th></span></q></dt></tr></i><div id='pFc3J'><tfoot id='pFc3J'></tfoot><dl id='pFc3J'><fieldset id='pFc3J'></fieldset></dl></div>
                2. 本文介绍了LeafletJS:如何删除缩放控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在尝试删除 LeafletJS 地图上的缩放控件 (+/-).

                  I'm trying to remove the zoom controls (+/-) on a LeafletJS map.

                  我正在使用 MapBox.js 版本的 Leaflet,但大多数的操作与 Leaflet 相同.我这样实现我的地图:

                  I'm using the MapBox.js version of Leaflet but most of the operations are the same as Leaflet. I implement my map like this:

                  var map = L.mapbox.map('map');
                  
                  var layer = L.mapbox.tileLayer('MAPBOX-ID', {
                      format: 'jpg70',
                      minZoom: 13,
                      maxZoom: 15,
                      reuseTiles: true, 
                      unloadInvisibleTiles: true
                  });
                  map.addLayer(layer);
                  map.setView([40.73547,-73.987856]);
                  

                  文档说有一个 zoomControl 选项可以从地图中删除缩放控件但我没有让它工作.

                  The documentation says there's a zoomControl option that will remove the zoom control from the map but I've had no luck in getting it to work.

                  如何使用此实现删除缩放控件?

                  How can I remove the zoom control with this implementation?

                  谢谢!

                  推荐答案

                  这对我有用:

                  var map = new L.map('map', { zoomControl: false });
                  

                  用 mapbox 试试:

                  With mapbox try:

                  var map = L.mapbox.map('map', { zoomControl: false });
                  

                  参见地图创建和zoomControl 选项在 Leaflet 文档中.

                  See map creation and the zoomControl option in the Leaflet documentation.

                  这篇关于LeafletJS:如何删除缩放控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:动态更改传单中多边形的颜色? 下一篇:传单:更新 GeoJson 过滤器?

                  相关文章

                  最新文章

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

                      <tfoot id='bzbZZ'></tfoot>

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