🐯
Copy of FATOS Developer
Developer SiteConsole
  • Maps
    • Map control
      • Sources
      • Bounds
      • Zoom
      • Center
      • Rotate (Heading)
      • Tilt
      • Flyto
      • Solid (Buildings)
      • Language
      • Theme
      • Event Once
      • Event On/Off
    • Layer Control
    • Map UI
    • Map Utilities
      • Rectangle
      • Circle
      • Polyline
      • Polygon
      • Area
      • Distance
      • Mark
  • Search
    • Name
    • Category
    • Address
    • Geocoding
  • Route
    • Passenger Car
    • Motorbike
    • Truck
    • Public Transportation
    • Bicycle
    • Pedestrian
  • TMS
    • Route with multiple waypoints
    • Route as optimize order of waypoints
    • Route as optimize order of logistics
    • Route as optimize order of delivery
    • Route to predict which is after some time
  • FMS
    • Realtime tracking
    • Driving trajectory analysis
    • Driving road pattern analysis
    • Driver behavior analysis
    • Road snap
    • Geofencing
  • Navigation SDK
    • For Fire Engine
    • For Mobility on Demand
    • For City GAS
  • Get your API Key
  • Troubleshooting
    • FAQ
Powered by GitBook
On this page
  1. Maps

Map UI

PreviousLayer ControlNextMap Utilities

Last updated 2 years ago

The Map UI function controls the properties of floating buttons on a map, such as provides button's on/off and sets button's positioning.

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

Drawing