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
  • CENTER_DATE_IMAGE
  • CHANGE_MEASURE
  • CLICK
  • COMPLETE_COLLECTIONS
  • FEATURES_CLICK
  • FIND_IMAGES_LOADED
  • FINISH_MEASURE
  • MAP_INITIALIZE
  • MAP_STATUS_EVENT
  • 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
  • OverlayManager

Classes

  • Map

Classes / View

  • MapStatusView

Geometry

Classes

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

Classes / Readers

  • GeoJSON
  • WKT

InfoBox

Classes

  • InfoBox

Layers

Classes

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

Classes / Base Layers

  • 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

MultiPolygon

MultiPolygon(polygons)

The MultiPolygon class allows you to group polygons and complete complex calculations over a larger area.

Learn more about how to implement the MultiPolygon class in our MultiPolygon tutorial

Constructor

# new MultiPolygon(polygons)

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

Coordinates.

Tutorials:
  • MultiPolygon
Example

Create simple MultiPolygon

const polygon = new Vexcel.Geometry.MultiPolygon([
     [
       [
         new Vexcel.Geometry.Location(35.585851593232356, -116.136474609375),
         new Vexcel.Geometry.Location(35.15584570226544, -117.39990234375),
         new Vexcel.Geometry.Location(35.02999636902566, -115.631103515625),
         new Vexcel.Geometry.Location(35.585851593232356, -116.136474609375),
       ]
     ],
     [
       [
         new Vexcel.Geometry.Location(35.737595151747826, -115.224609375),
         new Vexcel.Geometry.Location(35.08395557927643, -114.686279296875),
         new Vexcel.Geometry.Location(35.746512259918504, -113.97216796875),
         new Vexcel.Geometry.Location(35.737595151747826, -115.224609375),
       ],
     ],
 ]);

Classes

MultiPolygon

Methods

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

Make a complete copy of the geometry.

Clone

MultiPolygon

# getArea() → {number}

Get the area of the multipolygon on projected plane.

Area (on projected plane).

number

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

Return array of Location

array of Location object with latitude and longitude

Array.<Array.<Array.<Location>>>

# getType() → {object}

Get the type of this geometry.

Geometry type.

object

# setLocations(polygons)

Update polygons

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

Array of Array of array locations (rings) Location objects Array of linear rings that define the polygon. The first linear ring of the array defines the outer-boundary or surface of the polygon. Each subsequent linear ring defines a hole in the surface of the polygon. A linear ring is an array of vertices' coordinates where the first coordinate and the last are equivalent.

# 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