I will be getting coordinates as
25.774252, -80.190262
18.466465, -66.118292
32.321384, -64.75737
I have to maintain an array like
Coordinates[] = [(25.774252, -80.190262),(18.466465, -66.118292),(32.321384, -64.75737)]
How is this possible? Or is there any other method to get latitude and longitude point by point?
I tried like,
for(var i = 0 ; i < polygonBounds.length ; i++)
{
coordinates.push(polygonBounds.getAt(i).lat(), polygonBounds.getAt(i).lng());
}
but it will be like,
0
31.796473239688435
1
-106.51227951049805
2
31.797786324219413
3
-106.49425506591797
4
31.78392504670159
5
-106.47829055786133
6
31.757509914027327
7
-106.48704528808594
8
31.776191009772532
9
-106.52069091796875
10
31.790782991145434
11
-106.5208625793457
So now i have this array i need to take each latitude and longitude by looping the same array. How is it possible?
coordinates.push([polygonBounds.getAt(i).lat(), polygonBounds.getAt(i).lng()]);?