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
It provides no hints about what comes first, latitude or longitude.
You need to dive into the docs / examples / source code to find out that latitude is the first param and longitude is the second.
I tried to integrate supercluster with this lib, and faced a problem that it expects those params the other way, longitude first and latitude second. It creates a lot of confusion.
Thankfully, I think there is a super easy solution for this.
Just add a JSDoc comment to the Point type definition, describing the order:
Currently,
Point
andBounds
types are defined like this:It provides no hints about what comes first, latitude or longitude.
You need to dive into the docs / examples / source code to find out that latitude is the first param and longitude is the second.
I tried to integrate supercluster with this lib, and faced a problem that it expects those params the other way, longitude first and latitude second. It creates a lot of confusion.
Thankfully, I think there is a super easy solution for this.
Just add a JSDoc comment to the
Point
type definition, describing the order:Your IDE can show those comments as a useful tooltip on hover
The text was updated successfully, but these errors were encountered: