2017-09-11 42 views
1

我從地圖框方向找不到隱藏/刪除個人資料UI(交通,駕駛,散步,騎自行車)的選項。有沒有可用的選項?無法隱藏個人資料UI(交通,駕駛,散步,騎自行車)

profile ui section area的截圖。這是一節,我需要隱藏,Click here to view the profile ui section pic of mapbox directions

,我已經實現了代碼,

enableMapboxDirection() { 
    mapboxgl.accessToken = 'pk.eyJ1Ijoid2FsYWEtbWFwIiwiYSI6ImNqN2VuYmluZjBwZ2UzMnBqM20wNnJieWkifQ.2pKH-XbfOZuXzX9pEqGBjw'; 
    var directions = new MapboxDirections({ 
     accessToken: mapboxgl.accessToken, 
     controls: { 
     instructions: false, 
     }, 
     unit: 'metric', 
     profile: 'driving', 
    }); 
    var map = new mapboxgl.Map({ 
     container: 'map', 
     style: 'mapbox://styles/mapbox/streets-v9' 
    }); 
    map.on('load', function() {   
     directions.on('route', function(e) { 
     console.log(e); // Logs the current route shown in the interface. 
     console.log('Your Destination ',directions.getDestination()); 
     console.log('Your Origin ',directions.getOrigin()); 
     }); 
    }); 
    map.addControl(directions, 'top-left'); 

    } 

回答

0

您可以隱藏與controls.profileSwitcher參數配置文件UI。這個選項是幾天前由mapbox團隊添加的。