Leaflet 单张双图

Leaflet 单张双图,leaflet,Leaflet,我在调整传单的地图块时遇到问题: 当我缩小时,当加载时,你可以清楚地看到在我选择的磁贴下有另一个地图,有人知道如何修复这个问题吗 以下是生成地图的代码: var map = L.map('map').setView([46.681364, 11.129706], 5); L.tileLayer('https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}{r}.png', { attribution: '&

我在调整传单的地图块时遇到问题: 当我缩小时,当加载时,你可以清楚地看到在我选择的磁贴下有另一个地图,有人知道如何修复这个问题吗

以下是生成地图的代码:

var map = L.map('map').setView([46.681364, 11.129706], 5);
L.tileLayer('https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}{r}.png', {
    attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
    minZoom: 4,
    maxZoom: 18
}).addTo(map);
map.setMaxBounds([[-90,-180],[90,180]]);
<div id="map" class="leaflet-container leaflet-touch leaflet-fade-anim leaflet-grab leaflet-touch-drag leaflet-touch-zoom" tabindex="0" style="position: relative;top:0%; outline: none;width:100%;height:88%"><div class="leaflet-pane leaflet-map-pane" style="transform: translate3d(235px, -53px, 0px);"><div class="leaflet-pane leaflet-tile-pane"><div class="leaflet-layer " style="z-index: 1; opacity: 1;"><div class="leaflet-tile-container leaflet-zoom-animated" style="z-index: 16; transform: translate3d(66px, 244px, 0px) scale(0.25);"></div><div class="leaflet-tile-container leaflet-zoom-animated" style="z-index: 18; transform: translate3d(0px, 0px, 0px) scale(1);"></div></div></div><div class="leaflet-pane leaflet-shadow-pane"></div><div class="leaflet-pane leaflet-overlay-pane"></div><div class="leaflet-pane leaflet-marker-pane"></div><div class="leaflet-pane leaflet-tooltip-pane"></div><div class="leaflet-pane leaflet-popup-pane"></div><div class="leaflet-proxy leaflet-zoom-animated" style="transform: translate3d(16365px, 10834px, 0px) scale(64);"></div></div><div class="leaflet-control-container"><div class="leaflet-top leaflet-left"><div class="leaflet-control-zoom leaflet-bar leaflet-control"><a class="leaflet-control-zoom-in" href="#" title="Zoom in" role="button" aria-label="Zoom in">+</a><a class="leaflet-control-zoom-out" href="#" title="Zoom out" role="button" aria-label="Zoom out">−</a></div></div><div class="leaflet-top leaflet-right"></div><div class="leaflet-bottom leaflet-left"></div><div class="leaflet-bottom leaflet-right"><div class="leaflet-control-attribution leaflet-control"><a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a> | © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors</div></div></div></div>
var-map=L.map('map').setView([46.681364,11.129706],5);
L.tileLayer('https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z} /{x}/{y}{r}.png'{
属性:“©;参与者”,
minZoom:4,
最大缩放:18
}).addTo(地图);
setMaxBounds([[-90,-180],[90180]]);
|©撰稿人

这不可能是您的完整代码,您可以在其他地方添加第二个TileLayer这不是完整代码,但它是相关的,我在代码的任何其他部分都没有提到Tile,我还是更新了代码。请。您添加其他瓷砖,否则您的问题将不会发生。也许您可以在其他函数/脚本文件中添加分幅。你可以看,只有卫星瓷砖被装载。请创建一个运行示例我已经找出了问题所在,基本上在html中有一些具有“演示”角色的图像。我添加了这一行,因为我复制它来添加版权部分