GeoPath class

A geometry geographic generator for creating paths.

It is similar to the shape generators in d3-shape: given a GeoJSON geometry or feature object, it generates an SVG path data string or renders the path to a Canvas. Canvas is recommended for dynamic or interactive projections to improve performance. Paths can be used with projections or transforms, or they can be used to render planar geometry directly to Canvas or SVG.

Constructors

GeoPath([GeoTransform? transform, GeoPathContext? context])
Creates a new geographic path generator with the default settings.

Properties

context GeoPathContext?
Context used to render the path.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
pointRadius double Function(Map?)
A function which is computed per feature and used to display Point and MultiPoint geometries with the radius being the returned number.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transform GeoTransform?
A transform applied to any input geometry before it is rendered.
getter/setter pair

Methods

area(Map object) double
Returns the projected planar area (typically in square pixels) for the specified GeoJSON object.
bounds(Map object) List<List<num>>
Returns the projected planar bounding box (typically in pixels) for the specified GeoJSON object.
call([Map? object]) Object?
Renders the given object, which may be any GeoJSON feature or geometry object:
centroid(Map object) List<double>
Returns the projected planar centroid (typically in pixels) for the specified GeoJSON object.
measure(Map object) double
Returns the projected planar length (typically in pixels) for the specified GeoJSON object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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