Better way: var mapLayer = map.getLayer('route'); if(typeof mapLayer !== 'undefined') { // Remove map layer & source. map.removeLayer('route').
確定! 回上一頁