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
  • getDistance
  • Parameter
  • Example
  • Return

Was this helpful?

  1. FATOS API
  2. Map
  3. Utilities

Distance

Get a distance for given coordinates

getDistance

Returns the distance in meter between 2 or more coordinates.

mapInstance.getDistance(coordinates)

Parameter

Required Parameter

Description

Type

coordinates

Array of latitude/longitude. The array must contain at least 2 coordinates.

JSON Array

Example

mapInstance.getDistance(
   [
       {lng: -122.019807, lat: 45.632433},
       {lng: -122.019767, lat: 45.632453},
       {lng: -122.01971, lat: 45.632472}
   ])

Return

Distance value in the meter.

PreviousRectangleNextArea

Last updated 4 years ago

Was this helpful?