Overview
The Open Mobile Maps SDK uses coordinate systems to define positions on the map. When setting up a map, you must specify a coordinate system. The current implementation assumes a uniform, two-dimensional grid.The Coord Type
All map positions within Maps Core are represented by theCoord type:
Identifies which coordinate system the position values should be interpreted in
X-coordinate in the specified system
Y-coordinate in the specified system
Z-coordinate (elevation/height)
The
systemIdentifier allows the SDK to understand which coordinate system the values should be interpreted in at any given time.Supported Coordinate Systems
The SDK comes with implementations for several prominent coordinate systems:EPSG:3857 - Pseudo-Mercator
WGS 84 / Pseudo-Mercator
The most widely used coordinate system for web mapping
- Also known as: Web Mercator
- Used by: Google Maps, OpenStreetMap, and most tile providers
- Reference: https://epsg.io/3857
EPSG:4326 - WGS 84
WGS 84
Standard geographic coordinate system using latitude and longitude
- Used for: GPS coordinates, latitude/longitude
- Reference: https://epsg.io/4326
EPSG:2056 - LV95 (Swiss)
CH1903+ / LV95
Swiss coordinate system (LV03+)
- Used in: Switzerland
- Reference: https://epsg.io/2056
EPSG:21781 - LV03 (Swiss Legacy)
CH1903 / LV03
Legacy Swiss coordinate system
- Used in: Switzerland (legacy)
- Reference: https://epsg.io/21781
Unit Sphere
Unit Sphere Polar
Spherical coordinate system
- Format: Phi, theta, radius with reference to Earth as unit sphere
CoordinateSystemFactory
TheCoordinateSystemFactory provides factory methods to create coordinate systems:
MapCoordinateSystem Structure
The EPSG code or system identifier
The valid bounds for this coordinate system
Conversion factor from coordinate units to screen meters
Coordinate Conversion
TheMapScene holds a CoordinateConversionHelper to transform coordinates between different systems.
Using the Conversion Helper
CoordinateSystemIdentifiers
TheCoordinateSystemIdentifiers class provides static methods to access system identifiers:
Example: Parsing CRS Identifiers
Custom Coordinate Systems
You can register custom coordinate converters with theCoordinateConversionHelper:
Custom converters allow you to work with any projection or coordinate system your application requires.
Best Practices
Choose the Right System
Choose the Right System
Use EPSG:3857 for web mapping with standard tile providers. Use EPSG:4326 when working with GPS coordinates directly. Use regional systems (like EPSG:2056) for high-accuracy local applications.
Consistent System Usage
Consistent System Usage
Always specify the correct
systemIdentifier when creating Coord objects to avoid misinterpretation.Conversion Performance
Conversion Performance
Cache converted coordinates when possible, as coordinate conversion can be computationally expensive.
Bounds Checking
Bounds Checking
Verify that coordinates fall within the valid bounds of your chosen coordinate system.
Platform Examples
Related Topics
Architecture
Learn about the SDK architecture
Camera
Understand how the camera uses coordinates