Closed UVERtainment closed 4 years ago
Currently, im just trying to show the coordinates of the route im setting.
routeControl.on('routeselected', function (e) { var coord = e.route.coordinates; var name = e.route.name; alert('Array size = ' + coord.length + '\nCoordinates: \n' + coord.join('\n')); //$.postJSON('/Map/GetRouteCoordinates', coord); });
however, its showing: L.LatLng(1.22, 1.33) for eg.
i do not want the L.LatLng, i just want the 1.22 and 1.33. i don't think i saw anywhere in the documentation on how to get the lat/long in L.LatLng.
Use the .lat and .lng properties on the L.LatLng objects.
.lat
.lng
L.LatLng
Currently, im just trying to show the coordinates of the route im setting.
routeControl.on('routeselected', function (e) { var coord = e.route.coordinates; var name = e.route.name; alert('Array size = ' + coord.length + '\nCoordinates: \n' + coord.join('\n'));
//$.postJSON('/Map/GetRouteCoordinates', coord); });
however, its showing: L.LatLng(1.22, 1.33) for eg.
i do not want the L.LatLng, i just want the 1.22 and 1.33. i don't think i saw anywhere in the documentation on how to get the lat/long in L.LatLng.