传单单独绘制瓷砖 [英] Leaflet drawing tiles disjointly
本文介绍了传单单独绘制瓷砖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在实例化一个传单地图,但是这些图块基本上遍布整个页面 - 而地图位于div内,大部分图块都不尊重该边界:
I am instantiating a leaflet map, but the tiles are basically being scattered all over the page - while the map is within a div, most of the tiles are not respecting that boundary:
<div class="widget-content listing-search-map-widget-content">
<div class="ih-map"
id="Map_5333811_16"
style="height:450px;"
data-centerpoint="38.573955 -121.442478"
data-mousewheel="true"
data-maptype="TERRAIN"
data-zoom="8"
>
</div>
</div>
javascript归结为:
The javascript comes down to:
mapOptions = {
attributionControl: true,
center: {
lat: 38.573955
lng: -121.442478
},
centerpoint: "38.573955,-121.442478",
layers: {},
maptype: "Terrain",
scrollWheelZoom: false,
zoom: 8
}
var map = L.map( "Map_5333811_16", mapOptions );
什么会导致瓷砖遍布整个地方?几块瓷砖都在div,但不是其他人。你可以看到这里发生的事情的截图:
What would cause the tiles to plot all over the place?a couple of tiles are within the bounds of the div, but not the rest of them. You can see a screenshot of what happens here:
推荐答案
这听起来像缺少Leaflet CSS文件或该文件版本不正确的症状。
This sounds like a symptom of missing Leaflet CSS file, or incorrect version of that file.
这篇关于传单单独绘制瓷砖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文