import Multipoint from "@arcgis/core/geometry/Multipoint.js";
Inheritance
MultipointGeometryAccessor
Since
ArcGIS Maps SDK for JavaScript 4.0

An ordered collection of points.

Known Limitations

There is currently no support for rendering multipoint geometries in scenes (3D).

See also

Constructors

Constructor

Constructor

Parameters

ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
PropertyTypeClass
readonly inherited
readonly inherited
readonly inherited
inherited
inherited
number[][]
inherited
readonly
"multipoint"

cache

readonlyinherited Property
Type
Record<string, any>
Inherited from: Geometry

The cache is used to store values computed from geometries that need to be cleared or recomputed upon mutation. An example is the extent of a polygon.

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor
Since
ArcGIS Maps SDK for JavaScript 4.7

The name of the class. The declared class name is formatted as esri.folder.className.

extent

readonlyinherited Property
Type
Extent | null | undefined
Inherited from: Geometry

The extent of the geometry. For a point, the extent is null.

hasM

inherited Property
Type
boolean
Inherited from: Geometry

Indicates if the geometry has M values.

Default value
false

hasZ

inherited Property
Type
boolean
Inherited from: Geometry

Indicates if the geometry has z-values (elevation).

Z-values defined in a geographic or metric coordinate system are expressed in meters. However, in local scenes that use a projected coordinate system, vertical units are assumed to be the same as the horizontal units specified by the service.

Default value
false

points

Property
Type
number[][]

An array of points.

spatialReference

autocast inherited Property
Type
SpatialReference
Inherited from: Geometry

The spatial reference of the geometry.

Default value
SpatialReference.WGS84 // wkid: 4326

type

readonly Property
Type
"multipoint"

The string value representing the type of geometry.

Methods

MethodSignatureClass
inherited static
fromJSON(json: any): any
addPoint(point: Point | number[]): this
clone(): Multipoint
getPoint(index: number): Point | null | undefined
removePoint(index: number): Point | null | undefined
setPoint(index: number, point: Point | number[]): this
inherited
toJSON(): any

fromJSON

inheritedstatic Method
Signature
fromJSON (json: any): any
Inherited from: JSONSupportMixin

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameters

ParameterTypeDescriptionRequired
json
any

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns
any

Returns a new instance of this class.

addPoint

Method
Signature
addPoint (point: Point | number[]): this

Adds a point to the Multipoint.

Parameters

ParameterTypeDescriptionRequired
point

The point to add to the multipoint. The point can either be a Point or an array of numbers representing XY coordinates.

Returns
this

Returns the updated Multipoint.

clone

Method
Signature
clone (): Multipoint

Creates a deep clone of the Multipoint object.

Returns
Multipoint

A new instance of a Multipoint object equal to the object used to call .clone().

getPoint

Method
Signature
getPoint (index: number): Point | null | undefined

Returns the point at the specified index.

Parameters

ParameterTypeDescriptionRequired
index

The index of the point in the points property.

Returns
Point | null | undefined

The point at the specified index.

removePoint

Method
Signature
removePoint (index: number): Point | null | undefined

Removes a point from the Multipoint. The index specifies which point to remove.

Parameters

ParameterTypeDescriptionRequired
index

The index of the point to remove.

Returns
Point | null | undefined

Returns the removed point.

setPoint

Method
Signature
setPoint (index: number, point: Point | number[]): this

Updates the point at the specified index.

Parameters

ParameterTypeDescriptionRequired
index

The index of the point in the points property.

point

Point geometry that specifies the new location.

Returns
this

Returns the updated Multipoint.

toJSON

inherited Method
Signature
toJSON (): any
Inherited from: JSONSupportMixin

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns
any

The ArcGIS portal JSON representation of an instance of this class.