🐯
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
  • setCenter
  • getCenter
  1. Maps
  2. Map control

Center

setCenter

Sets the center of the map.

mapInstance.setCenter(LatLng);

Parameter

Required Parameter

Description

Type

LatLng

Latitude and longitude to be set as the center of the map

JSON

Example

let LatLng = {
        lat: 37.574674, 
        lng: 126.958004
}
mapInstance.setCenter(LatLng);

getCenter

Retrieves the latitude and longitude value set in "setCenter()"

mapInstance.getCenter();

Return

The map's geographical center point

Example

mapInstance.getCenter();
return : {
        lat: 37.574674, 
        lng: 126.958004
}
PreviousZoomNextRotate (Heading)

Last updated 2 years ago