MapProjection class
Coordinate projection utilities for maps.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
dimensions(
MapType type) → ({double aspectRatio, double height, String viewBox, double width}) - Get map dimensions for a given map type.
-
getCoordinates(
MapType type, String? id, double lat, double lng) → (double, double) - Get coordinates for a location (uses pre-calculated if available).
-
latLngToSvg(
MapType type, double lat, double lng) → (double, double) - Convert lat/lng to SVG coordinates.
-
svgToLatLng(
MapType type, double x, double y) → (double, double) - Convert SVG coordinates to lat/lng.
Constants
-
commonLocations
→ const Map<
String, (double, double)> - Common location lat/lng coordinates.
- usaAspectRatio → const double
- USA map aspect ratio.
-
usaCityCoords
→ const Map<
String, (double, double)> - Pre-calculated SVG coordinates for major US cities.
- usaHeight → const double
- USA map SVG height.
-
usaStateNames
→ const Map<
String, String> - US state names lookup.
- usaViewBox → const String
- USA map viewBox.
- usaWidth → const double
- USA map SVG width.
- worldAspectRatio → const double
- World map aspect ratio.
-
worldCityCoords
→ const Map<
String, (double, double)> - Pre-calculated SVG coordinates for major world cities.
- worldHeight → const double
- World map SVG height.
- worldViewBox → const String
- World map viewBox.
- worldWidth → const double
- World map SVG width.