How to define Langitude and Longitude in node.js using google maps package?
I tried below code to declare Langitude and Longitude see: var origin1 But it throws gs has no method 'LatLng' Can u suggest me to how to define LAtLng??
function calculateDistances() {
var gs =require('googlemaps');
//in next line i tried to define LAtLNG it throws gs has no method 'LatLng'
**var origin1 = gs.LatLng(13.125511084202,80.029651635576);**
//Below code i tried in html
var origin2 = new google.maps.LatLng(12.9898593006481,80.2497744326417);;
var destinationA = new google.maps.LatLng(13.125511084202,80.029651635576);;
var destinationB = new google.maps.LatLng(12.9898593006481,80.2497744326417);
var service = new google.maps.DistanceMatrixService();
service.getDistanceMatrix(
{
origins: [origin1, origin2],
destinations: [destinationA, destinationB],
travelMode: google.maps.TravelMode.DRIVING,
unitSystem: google.maps.UnitSystem.METRIC,
avoidHighways: false,
avoidTolls: false
}, callback);
}