logo
API Documentation
Tutorials
Getting Started Initialization Layers Third party Controls Geometries Vector styles Measures InfoBox Utils
Releases

Documentation

Modules

  • Constants

Events

  • FEATURE_CLICK
  • FEATURE_HOVER
  • VISIBILITY_CHANGE
  • CENTER_DATE_IMAGE
  • CHANGE_MEASURE
  • CLICK
  • COMPLETE_COLLECTIONS
  • FEATURES_CLICK
  • FIND_IMAGES_LOADED
  • FINISH_MEASURE
  • MAP_INITIALIZE
  • MAP_STATUS_EVENT
  • MAP_VISIBILITY_CHANGE
  • MOVE_END
  • NO_3D_IMAGES
  • POINTER_MOVE
  • START_MEASURE
  • TILES_END_LOAD
  • TILES_START_LOAD
  • FEATURE_CLICK
  • FEATURE_HOVER

General

Classes / Controls

  • Bar
  • Button
  • Swipe
  • Toggle

Classes / Managers

  • CollectionManager
  • MeasurementManager
  • OverlayManager

Classes

  • Map

Classes / View

  • MapStatusView

Geometry

Classes

  • Extent
  • Feature
  • Line
  • Location
  • MultiLine
  • MultiPoint
  • MultiPolygon
  • Point
  • Polygon

Classes / Readers

  • GeoJSON
  • WKT

InfoBox

Classes

  • InfoBox

Layers

Namespaces

  • LayerEvents

Classes

  • ArcGISLayer
  • BingLayer
  • GroupLayer
  • ImageryLayer
  • OSMLayer
  • VectorLayer
  • VectorTileLayer
  • WFSLayer
  • WMSLayer
  • WMTSLayer
  • XYZLayer

Classes / Base Layers

  • BaseGroupLayer
  • BaseLayer
  • BaseVectorLayer

Measurements

Classes / Tools

  • CircleTool
  • HeightTool
  • LineTool
  • PointTool
  • PolygonTool
  • RectangleTool
  • RelativeHeightTool

Classes

  • Measure

Objects

Classes

  • Collection
  • CollectionStatus
  • Image
  • LayerCollections
  • LayerCollectionsStatus
  • MapStatus

Services

Classes

  • UserService

Styles

Classes

  • Circle
  • Fill
  • Icon
  • RegularShape
  • Stroke
  • Style
  • Text

Utils

Classes

  • Transform

Class

MultiLine

MultiLine(locations)

The MultiLine class allows you to draw multiple connected lines on a map. In many spatial database systems, these are referred to as PolyLines or LineStrings.

To create a polyline, provide an array of arrays of Location objects to the constructor. See the geometries-multiline tutorial for implementation details.

Constructor

# new MultiLine(locations)

Create a new MultiLine geometry.

Parameters:
Name Type Description
locations Array.<Array.<Location>>

Array of arrays of Location objects.

Tutorials:
  • Tutorial: geometries-multiline

If no locations are provided.

Error
Example

Create a simple MultiLine

const line = new Vexcel.Geometry.MultiLine([
  [
    new Vexcel.Geometry.Location(30.770159115784214, -86.6162109375),
    new Vexcel.Geometry.Location(31.914867503276223, -88.57177734375),
    new Vexcel.Geometry.Location(33.50475906922609, -87.2094726562),
  ],
  [
    new Vexcel.Geometry.Location(40.40478114596104, -104.98070585728213),
    new Vexcel.Geometry.Location(40.404746239340966, -104.98102257159059),
  ]
]);

Classes

MultiLine

Methods

# clone() → (non-null) {MultiLine}

Create a deep copy of this MultiLine geometry.

A cloned MultiLine instance.

MultiLine

# getCenterLocation() → {Location}

Get the center location of the polyline.

Center Location object.

Location

# getLength() → {number}

Get the total length of the polyline on the projected plane.

Length in map units.

number

# getLocations() → {Array.<Array.<Location>>}

Get the locations that define the polyline.

Array of arrays of Location objects with latitude and longitude.

Array.<Array.<Location>>

# getType() → {object}

Get the geometry type.

Geometry type.

object

# setLocations(lines)

Update the polyline with new locations.

Parameters:
Name Type Description
lines Array.<Array.<Location>>

Array of arrays of Location objects.

# toGeoJSON() → {string}

Convert geometry to GeoJSON string with xy coordinates [long, lat].

GeoJSON representation.

string

# toWKT() → {string}

Convert geometry to WKT string with xy coordinates [long, lat].

WKT representation.

string

Documentation generated by Vexcel Imaging