OsmId.fromString constructor

OsmId.fromString(
  1. String s
)

Parses a string like "n123" into OsmId with the type from the letter (e.g. node for "n") and the number from the rest.

Implementation

factory OsmId.fromString(String s) {
  return OsmId(OsmElementType.node, int.parse(s.substring(1)));
}