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

Documentation

Modules

  • Constants

Events

  • FEATURE_CLICK
  • FEATURE_HOVER
  • CENTER_DATE_IMAGE
  • CHANGE_MEASURE
  • CLICK
  • COMPLETE_LAYERS_AOIS
  • FEATURES_CLICK
  • FIND_IMAGES_LOADED
  • FINISH_MEASURE
  • LAYER_AOIS
  • MAP_INITIALIZE
  • 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

  • LayerManager
  • MeasurementManager

Classes

  • Map

Geometry

Classes

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

Classes / Readers

  • GeoJSON
  • WKT

InfoBox

Classes

  • InfoBox

Layers

Classes / Internal

  • AOILayer
  • CollectionLayer

Classes

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

Classes / Base Layers

  • BaseGroupLayer
  • BaseTileLayer
  • BaseVectorLayer

Measurements

Classes / Tools

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

Classes

  • Measure

Services

Classes

  • UserService

Styles

Classes

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

Utils

Classes

  • Transform

Class

Line

Line(locations)

The line class allows you to draw connected lines on a map. In many spatial database systems, these are called PolyLines, or LineStrings.

When creating a polyline, an array of locations must be passed as an argument in the constructor. See an implementation in our Line tutorial.

Constructor

# new Line(locations)

Parameters:
Name Type Description
locations Array.<Location>

array of locations.

Tutorials:
  • Line
Example

Create simple line

const line =  new Vexcel.Geometry.Line(
[
      new Vexcel.Geometry.Location(30.770159115784214, -86.6162109375),
      new Vexcel.Geometry.Location(31.914867503276223, -88.57177734375),
      new Vexcel.Geometry.Location(33.50475906922609, -87.2094726562),
 ]);

Classes

Line

Methods

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

Make a complete copy of the line.

Clone

Line

# getLength() → {number}

Return the length of the polyline on projected plane.

Length (on projected plane).

number

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

Returns the locations that define the polyline.

array with location object with latitude and longitude

Array.<Location>

# getType() → {object}

Get the type of this geometry.

Geometry type.

object

# setLocations(locations)

Update polyline locations.

Parameters:
Name Type Description
locations Array.<Location>

Array of Location objects

# toGeoJSON() → {string}

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

string

# toWKT() → {string}

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

string

Documentation generated by Vexcel Imaging