You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I've got some issues regarding coordinates' order:
Polygons are using [lng, lat] format while polylines and points are using [lat, lng] format, which is confusing.
Moreover, latitudeFirst() makes longitude first and longitudeFirst() makes latitude first. So these functions has opposed meaning.
Lastly, calling one of these functions switches order permanently, so afterwards user need to call the opposed function and remember whether they've "inverted" the order or not.
This behavior is not documented.
My explanations may look unclear, so let me illustrate them by the example.
Imagine that I've generated a bunch of polygons and polylines using [lat, lng] format.
That's what I want my code to look like (regarding that there are no issues):
Please, describe this behavior somewhere in README.md and implement a correct behavior in a new version or, if it's not possible to maintain compatibility with the older versions, create a fork that works as expected.
P.S. In general, nice work, mate, awesome library!
The text was updated successfully, but these errors were encountered:
- Give background for when GeoJSON can be passed and when an array can be passed to `options.data` (robertleeplummerjr#79)
- Give example for how to use `.update()` and `.remove()`
- Add information on `longitudeFirst()`, `latitudeFirst()`, `pointsInstances`, `linesInstances`, and `shapesInstances`
- Add information about the default expected order of lat and lng being different for `.shapes()` than it is for `.points()` and `.lines()` (robertleeplummerjr#78 and robertleeplummerjr#1)
Hello, I've got some issues regarding coordinates' order:
[lng, lat]
format while polylines and points are using[lat, lng]
format, which is confusing.latitudeFirst()
makes longitude first andlongitudeFirst()
makes latitude first. So these functions has opposed meaning.My explanations may look unclear, so let me illustrate them by the example.
Imagine that I've generated a bunch of polygons and polylines using
[lat, lng]
format.That's what I want my code to look like (regarding that there are no issues):
That's what I expect my code look like regarding the first issue:
That's what I expect my code to look like regarding the second issue:
And that's what my code finally looks like (regarding the third issue):
Please, describe this behavior somewhere in README.md and implement a correct behavior in a new version or, if it's not possible to maintain compatibility with the older versions, create a fork that works as expected.
P.S. In general, nice work, mate, awesome library!
The text was updated successfully, but these errors were encountered: