2014-10-29 59 views
1

有誰知道我如何移除地圖上的多義線。我已經嘗試了很多東西來刪除繪製的線條。但它不會消失。這是我用來畫線的代碼:從地圖框移除地圖上的多義線

var geojson = [ 
    { 
    "type": "Feature", 
    "geometry": { 
     "type": "LineString", 
     "coordinates": [ 
     [10.39799, 63.43074], 
     [10.3987, 63.431] 
     ] 
    }, 
    "properties": { 
     "stroke": "#fc4353", 
     "stroke-width": 5 
    } 
    },{ 
    "type": "Feature", 
    "geometry": { 
     "type": "LineString", 
     "coordinates": [ 
     [10.397958755, 63.431], 
     [10.39868, 63.43073] 
     ] 
    }, 
    "properties": { 
     "stroke": "#fc4353", 
     "stroke-width": 5 
    } 
    } 
]; 

L.geoJson(geojson, { style: L.mapbox.simplestyle.style }).addTo(map); 

回答