php - How to calculate two values from bracket in javascript -
i creating geofencing featured website. need calculate expression. have 2 values related latitude , longitude.
for e.g: var value = '(41.878113,-87.629798)'
how separate above 2 values in javascript
the google maps latlng api provides .lat()
, .lng()
functions accessing them individually. can use them this:
var coords = new google.maps.latlng(42.878113,-87.629798); console.log(coords.lat()); // 42.878113 console.log(coords.lng()); // -87.629798
Comments
Post a Comment