Closed greytexture closed 5 years ago
The same problem was happening to me. After a while, I figured it out that the coordinates must be in the format [lon, lat], not otherwise.
It is described in the readme as well and I hadn't noticed previously.
Thanks for taking that @valdenio, the order of coordinates is very important, thank you. Maybe it should have been an object {lat, lon}
, what do you think? @valdenio @vikaskumar2299, it seems less confusing I suppose.
@gabzim I guess it would be more intuitive if it were {lat, lon}. In that case, the order of the returned coordinates should also be changed (currently it is {lon, lat} in the response too, right?).
I mean it would be objects so key order wouldn't matter. The reason it's an array is because that's how most libraries deal with coordinates, [lon,lat]
, but it can be a little less intuitive for a programmer.
I used following code to return a polygon which is approximately like a circle.
When I used coords and created a polygon shape using Google Maps JS API, it showed a shape like oval (2 ends were very far from each other, two very near, hope you understand).
In fact, the different in distances is approx. 4:1 ratio. So it's never a shape closer to circle.
Is there any issue, or is it supposed to do this intentionally?