gpt4 book ai didi

leaflet.js 正在尝试加载超出范围的图 block

转载 作者:行者123 更新时间:2023-12-05 02:21:42 25 4
gpt4 key购买 nike

我正在像这样初始化传单:

var map,
imageWidth = 6400,
imageHeight = 8000,
tileSize = 200;

L.tileLayer('tiles/{z}/map_{x}_{y}.png', {
minZoom: 17,
maxZoom: 20,
updateWhenIdle: true,
noWrap: true,
tileSize: tileSize,
unloadInvisibleTiles: false,
reuseTiles: true,
crs: L.CRS.Simple
}).addTo(map);

map.doubleClickZoom.disable();

var southWest = map.unproject([0, imageHeight], map.getMaxZoom());
var northEast = map.unproject([imageWidth, 0], map.getMaxZoom());
map.setMaxBounds(new L.LatLngBounds(southWest, northEast));

我收到这些控制台错误:

GET http://localhost:8000/dist/tiles/17/map_83886_83886.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_83885_83886.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_83886_83885.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_83885_83885.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_83885_83887.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_83886_83887.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_3_5.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_2_5.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_1_5.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_83884_83886.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_83887_83886.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_83884_83887.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_83884_83885.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_83887_83885.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_83887_83887.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_4_3.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_4_4.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_4_2.png 404 (Not Found)
map.html:32 GET http://localhost:8000/dist/tiles/17/map_4_5.png 404 (Not Found)

我不太明白为什么图书馆要尝试加载这些图 block ,因为我已经设置了边界,所以传单不应该尝试加载超出它们的任何东西?

我使用 map.unproject 的方式有什么问题吗?就用户可以将图像拖放到屏幕上的距离而言,边界似乎效果很好。

谢谢!

最佳答案

maxBounds来自类型 LatLngBounds .因此,您必须输入坐标,而不是像示例中那样输入像素大小。

关于leaflet.js 正在尝试加载超出范围的图 block ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32699940/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com