tryParse static method

GeoPoint2m? tryParse(
  1. String text, {
  2. ParseCoords? parser,
})
override

A point parsed from text with coordinates in order: lon, lat, m.

If parser is null, then WKT text like "10.0 20.0 5" is expected.

Returns null if cannot parse.

Implementation

static GeoPoint2m? tryParse(String text, {ParseCoords? parser}) {
  try {
    return GeoPoint2m.parse(text, parser: parser);
  } on Exception {
    return null;
  }
}