使用传单javascript API比19级进一步放大?


15

我们将传单JavaScript API与支持最多19级缩放的图块层一起使用。我希望用户能够进一步缩放,即使图块模糊,因为他们必须高度精确地放置标记。

这可能吗 ?

我们希望地图不缩放标记或其他元素。

Answers:


20

您现在可以执行此操作,从0.7版开始,还有一个名为“ maxNativeZoom”的附加选项,此选项之后将对图块进行插值。

这是最新文档链接maxNativeZoom

这是信息:

minZoom Number  0   Minimum zoom number.
maxZoom Number  18  Maximum zoom number.
maxNativeZoom   Number  null    Maximum zoom number the tiles source has available. If it is specified, the tiles on all zoom levels higher than maxNativeZoom will be loaded from maxZoom level and auto-scaled.

我用来实现它的代码示例在这里:

var aerial = new L.tileLayer(serverURL + "/arcgis/rest/services/Basemaps/Orthophoto/ImageServer/tile/{z}/{y}/{x}", {
    attribution: attribution,
    maxZoom: 20,
    maxNativeZoom: 18
});

1
完美的解决方案
ajayel
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.