fromString static method

GeoCoordinates? fromString(
  1. String input
)

Constructs GeoCoordinates from the provided string in specified format.

Corrects values of lat and long if they exceed the ranges. If the latitude value is out of range of [-90.0, 90.0] it's clamped to that range. If the longitude value is out of range of [-180.0, 180.0] it's replaced with a value within the range, representing effectively the same meridian. Examples: 53.43762,-13.65468. 49°59'56.948"N, 15°48'22.989"E 50d4m17.698N 14d24m2.826E 49.9991522N, 150.8063858E 40°26′47″N 79°58′36″W

  • input String representing GeoCoordinates in one of supported formats.

Returns GeoCoordinates?. Created GeoCoordinates, or 'null' if string was not in appropriate format.

Implementation

static GeoCoordinates? fromString(String input) => $prototype.fromString(input);