PTShape class Maps & 3D Scenes

Drawable geometry of a public transport route.

Shapes are provided deduplicated in PTStopInfo.shapes — one entry per distinct (geometry, direction) — and referenced by PTRouteInfo.shape; both share the same PTShape instances. Only present when requested via PTStopScheduleFilter.shapes.

The points are ordered in the travel direction of the referencing route, so directional arrows can be derived from consecutive points. An empty points list means the shape failed to decode — the entry is kept so the positional shape references of the response stay valid.

Also see:

Constructors

PTShape({required List<Coordinates> points})
Create a PTShape.

Properties

hashCode int
The hash code for this object.
no setterinherited
points List<Coordinates>
Shape points, in travel direction (empty when the shape failed to decode).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMarker() Marker?
Converts this shape into a drawable map Marker (a polyline, part 0).
toString() String
A string representation of this object.
inherited

Operators

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