我正在嵌入mapbox地圖 - 我發現在地圖中間放置了一個空白行,正如您可以從附加圖像中看到的那樣。Mapbox - 圖層中的奇怪白線
有誰知道問題是什麼?
我也使用twitter-bootstrap框架。
,這是地圖div HTML/CSS我用:
<div class="map"></div>
.map{
max-width:none !important;
width:100% !important;
height:250px !important;
max-height:250px;
position: relative;
margin:0 auto !important;
}
,這是我的js:
var map = mapbox.map(_element);
map.addLayer(mapbox.layer().id('examples.map-uh4ustwo'));
// Create an empty markers layer
var markerLayer = mapbox.markers.layer();
// Add interaction to this marker layer. This
// binds tooltips to each marker that has title
// and description defined.
mapbox.markers.interaction(markerLayer);
map.addLayer(markerLayer);
map.zoom(3).center({ lat: _json.lat, lon: _json.lon });
// Add a single feature to the markers layer.
// You can use .features() to add multiple features.
markerLayer.add_feature({
geometry: {
coordinates: [_json.lon, _json.lat]
},
properties: {
'marker-color': '#F96363',
'marker-symbol': 'circle-stroked',
/*title: 'Example Marker',
description: 'This is a single marker.'
*/
}
});
感謝。
你有沒有忘了附上圖片? – salih0vicX
@ salih0vicX是的,現在有 – sbaaaang