Button control
Edit button properties
Button Visibility
You can toggle the visibility of control buttons with the following functions.
    let LatLng = {lat: 37.482901, lng: 126.896038};
    let mapInstance = new fatosmap.maps.Map(
        document.getElementById("app"),
        {
            zoom: 14,
            center: LatLng,
            maxZoom: 20,
            minZoom: 2,
            key: 'YOUR_API_KEY'
            
            // button 
            buttonControl: false, // Remove all buttons. Default true. 
            btnTheme: false, // Remove the theme button. Default true.
            btnPitch: false, // Remove the pitch(3D) button. Default true.
            btnBuilding3d: false, // Remove the building button. Default true.
            btnZoom: false, // Remove the zoom button. Default true.
            btnCompass: false, // Remove the compass button. Default true.
            btnBering: false, // Remove the bering button. Default true.
            btnDistance: false, // Remove the distance button. Default true.
            btnArea: false, // Remove the area button. Default true.
            btnRadius: false, // Remove the radius button. Default true.
            btnFullScreen: false, // Remove the fullScreen button. Default true.
            btnGeoLocate: false, // Remove the geoLocate button. Default true.
            btnTraffic: false, // Remove the traffic button. Default true.
        }
    )/*
You can create or remove a button bar at the top right of 
the map with all buttons.
*/
mapInstance.onBtnAll();
mapInstance.offBtnAll();
// Theme Button.
mapInstance.onBtnTheme();
mapInstance.offBtnTheme();
// Pitch button.
mapInstance.onBtnPitch();
mapInstance.offBtnPitch();
// Building button.
mapInstance.onBtnBuilding3d();
mapInstance.offBtnBuilding3d();
// Zoom-in and zoom-out button.
mapInstance.onBtnZoom();
mapInstance.offBtnZoom();
// Compass button.
mapInstance.onBtnCompass();
mapInstance.offBtnCompass();
// Bering button.
mapInstance.onBtnBering();
mapInstance.offBtnBering();
// Radius button.
mapInstance.onBtnRadius();
mapInstance.offBtnRadius();
// Area Button.
mapInstance.onBtnArea();
mapInstance.offBtnArea();
// Distance Button.
mapInstance.onBtnDistance();
mapInstance.offBtnDistance();
// Full-screen button.
mapInstance.onBtnFullScreen();
mapInstance.offBtnFullScreen();
// Geographic location button.
mapInstance.onBtnGeoLocate();
mapInstance.offBtnGeoLocate();
// Traffic button.
mapInstance.onBtnTraffic();
mapInstance.offBtnTraffic();Last updated
Was this helpful?