我正在单张地图图表中工作。 我试图实现nowrap选项,但它不工作。请任何人建议解决这个问题。单张+ noWrap选项不能在上述1.x版本中工作
我重视我的代码:
var map = L.map('map', {
worldCopyJump: true,
inertia: false
}).setView([10.8, -140.7], 2);
// OSM tiles
//L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
L.tileLayer('http://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png',{
maxZoom: 18,
continuousWorld: false,
noWrap: true
}).addTo(map);
var marker = L.marker([-29.5, 143]).addTo(map);
marker.bindPopup('-29.5, 143');
重要
当我使用这个主题的“http:// {S} .tile.openstreetmap.org/{Z}/{X }/{y} .png“它的工作,但是当我试图使用黑暗的主题不工作。相同的代码在0.x版本中工作。
http://jsfiddle.net/rajinikumarr/JKFgD/46
输出除外:地图不应该在任何分辨率重复。
用当前的传单大师转载:http://playground-leaflet.rhcloud.com/run/1/edit?html,output – ghybs
看起来像OSM贴图也存在错误,但不可见,因为OSM不提供服务但CartoCDN确实为正X(但不是负值) – ghybs
您应该在Leaflet bug跟踪器上报告它:https://github.com/Leaflet/Leaflet/issues – ghybs