Skip to content

Add projected-coordinate conversion to the map view holder - #38

Merged
wf9a5m75 merged 1 commit into
developfrom
feat/map-projected-coordinates
Nov 12, 2026
Merged

wf9a5m75 merged 1 commit into
developfrom
feat/map-projected-coordinates

Conversation

@wf9a5m75

Copy link
Copy Markdown
Contributor

Summary

Add a way to convert between latitude/longitude and the projected coordinates of the map engine currently shown (not screen coordinates, which toScreenOffset / fromScreenOffset already cover):

  • coordinateSystem — the engine's coordinate system (e.g. EPSG:3857 meters, EPSG:4326 degrees).
  • toProjectedPoint(geoPoint) / fromProjectedPoint(point).

The default is Web Mercator (EPSG:3857, meters); providers whose engine can use another projection override it. On a globe view the Mercator coordinates are returned.

Provider PRs and the example page depend on this one.

Also renames WebMercatorProjection to WebMercator.

Commits

  • Add projected coordinates to MapViewHolderProtocol; rename WebMercator

coordinateSystem / toProjectedPoint / fromProjectedPoint convert between
latitude/longitude and the coordinate system the map engine lays the map
out in (not screen coordinates). They are protocol requirements so that
overrides dispatch, and AnyMapViewHolder forwards them. The default is
EPSG:3857 meters, which fits Mercator-only engines and globe display.

WebMercatorProjection is renamed WebMercator to match android-sdk and
js-sdk-core; GroundImageTileProvider's private helper of that name
becomes MercatorPixels.
@wf9a5m75
wf9a5m75 merged commit dd7bd9b into develop Nov 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant