FATOS Map Developers (Powered by NostraMap)
Developer SiteConsole
  • FATOS Developer Introduction
  • FATOS API
    • Map
      • Map control
        • Building
        • Bounds
        • Center
        • Heading
        • Flyto
        • Tilt
        • Zoom
        • Marker
          • Instance Members
        • Polyline
        • Polygon
        • Circle
        • On/Off
        • Once
        • Language
        • Theme
        • Cluster
          • Instance Members
      • Button control
      • Utilities
        • Rectangle
        • Distance
        • Area
    • Search
      • POI
      • Address
      • Geocoding
        • Forward
        • Reverse
      • Geofencing
    • Routing
      • Route
      • Route for truck
    • Advanced
      • Logistics
  • FATOS SDK
    • Authentication
    • Platform
      • Android
        • Start
        • Component
      • iOS
        • Start
        • Component
      • React Native
        • Start
        • Component
  • Release note
    • FATOS Map API
    • API Server
    • RP Server
  • Get your API Key
  • Troubleshooting
    • FAQ
Powered by GitBook
On this page

Was this helpful?

  1. FATOS API
  2. Map

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();
PreviousInstance MembersNextUtilities

Last updated 3 years ago

Was this helpful?