本文介紹了傳單不連貫地繪制瓷磚的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
限時送ChatGPT賬號..
我正在實例化一張傳單地圖,但圖塊基本上散布在整個頁面上 - 雖然地圖位于 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.
這篇關于傳單不連貫地繪制瓷磚的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!