OsmElement class

An OSM element downloaded from the server.

Constructors

OsmElement({required OsmId id, required int version, required DateTime timestamp, DateTime? downloaded, required Map<String, String> tags, LatLng? center, Geometry? geometry, List<int>? nodes, Map<int, LatLng>? nodeLocations, List<OsmMember>? members, IsMember isMember = IsMember.no})
OsmElement.fromJson(Map<String, dynamic> data)
factory

Properties

center → LatLng?
final
downloaded DateTime?
final
geometry Geometry?
final
hashCode int
The hash code for this object.
no setterinherited
id OsmId
final
idVersion String
no setter
isArea bool
no setter
isGeometryValid bool
no setter
isGood bool
no setter
isMember IsMember
final
isPoint bool
no setter
isSnapTarget bool
no setter
members List<OsmMember>?
final
nodeLocations Map<int, LatLng>?
final
nodes List<int>?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tags Map<String, String>
final
timestamp DateTime
final
type OsmElementType
no setter
version int
final

Methods

copyWith({Map<String, String>? tags, int? id, int? version, LatLng? center, Geometry? geometry, IsMember? isMember, List<int>? nodes, Map<int, LatLng>? nodeLocations, bool currentTimestamp = false, bool clearMembers = false}) OsmElement
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited
updateMeta(OsmElement? old) OsmElement
Updates location and reference properties from old (When this element was downloaded fresh, but is missing some).

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

tagsToString(Map<String, String?> tags) String