Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

latitude and longitude distance calculate in node js

// npm i geolib

const { getDistance } = require('geolib');
const distance = getDistance(
    { latitude: 51.5103, longitude: 7.49347 },
    { latitude: 51.5200, longitude: 7.49347 }
)
console.log(distance / 1000) //value in km

//$uj@y
 
PREVIOUS NEXT
Tagged: #latitude #longitude #distance #calculate #node #js
ADD COMMENT
Topic
Name
3+5 =