MapPolyline.withRepresentation constructor

MapPolyline.withRepresentation(
  1. GeoPolyline geometry,
  2. MapPolylineRepresentation representation
)

Creates a new MapPolyline instance with a specified visual representation.

Altitude component of GeoPolyline's vertices is ignored.

After creating a MapPolyline with this representation, the deprecated MapPolyline properties do not work and any change to them will be ignored. Any modifications to polyline's appearance must be done with MapPolyline.setRepresentation.

  • geometry The list of vertices representing the polyline.

  • representation The styling properties of the polyline.

Implementation

factory MapPolyline.withRepresentation(GeoPolyline geometry, MapPolylineRepresentation representation) => $prototype.withRepresentation(geometry, representation);