getCoordinates static method

(double, double) getCoordinates(
  1. MapType type,
  2. String? id,
  3. double lat,
  4. double lng,
)

Get coordinates for a location (uses pre-calculated if available).

Implementation

static (double x, double y) getCoordinates(
  MapType type,
  String? id,
  double lat,
  double lng,
) {
  if (id != null) {
    final coords = type == MapType.world
        ? worldCityCoords[id]
        : usaCityCoords[id];
    if (coords != null) return coords;
  }
  return latLngToSvg(type, lat, lng);
}