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
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
The projection math in TransformState is often dependent on the current scale, but it would be great to factor some of that to be based on Projection, which is more readily available to code at the SDK level. That would hep to eliminate some of the additional redundancy at the SDK level.
I believe we shouldn't use vec2<T> directly (we could enforce this by e.g. enforcing a private ctor). Instead, we'd use meaningful aliases like PrecisionPoint. It seems to me that Coordinate and PrecisionPoint are correlates, so we might get rid of Coordinate. From what I see, std::array<float, 2> can also be easily transformed into a PrecisionPoint. In sum, we'd get rid of vec2<T> (directly), Coordinate and std::array<float, 2>.
We represent coordinates using no less than 8 different types in different parts of the code:
LatLng
ProjectedMeters
PrecisionPoint
TileCoordinate
TileID
std::array<float, 2>
vec2
Coordinate
This is three more than we should have. We should have:
LatLng
)ProjectedMeters
, but the naming is off -- this class should be unit-less)PrecisionPoint
, but should be renamed to something likeScreenCoordinate
)TileID
)Coordinate
)So the ones to eliminate are:
std::array<float, 2>
vec2
TileCoordinate
For bounds, we have:
LatLngBounds
MetersBounds
box
(I'm in the process of removing this.)The text was updated successfully, but these errors were encountered: