Powered by Zoomin Software. For more details please contactZoomin

HERE Maps API for JavaScript - API Reference

Product category
Technology
Doc type
Version
Product lifecycle
This publication

HERE Maps API for JavaScript - API Reference: Class: MultiGeometry

Table of Contents

Class: MultiGeometry

H.geo.MultiGeometry

new H.geo.MultiGeometry (geometries) abstract

The base class for a geometry that is a container for multiple geometries of a generic type. The type of the contained geometries is specified by the generic type parameter T.

Name Type Description
geometries Array.<!T>

The list of geometries which are initially aggregated.

Throws:

if geometries parameter is not valid

Type
H.lang.InvalidArgumentError

Extends

Methods

equals (other)boolean inherited overrides

Checks whether the geometry is equal to the geometry supplied by the caller. Two geometries are considered as equal if they represent the same geometry type and have equal coordinate values.

Name Type Description
other *

The geometry to check against

Returns:
Type Description
boolean true if the two geometries are equal, otherwise false

getBoundingBox ()H.geo.Rect inherited overrides

Returns the bounding rectangle of the geometry.

Returns:
Type Description
H.geo.Rect the bounding rectangle of the geometry or null if the bounding rectangle can't be computed (e.g. for a geometry without coordinates)

getGeometries ()Array.<!T>

Returns the aggregated geometries of the multi-geometry. The returned geometries must be treated as read-only to not violate the integrity of the multi-geometry.

Returns:
Type Description
Array.<!T> An array of geometries

push (geometry)

Adds the specified geometry to the current multi-geometry.

Name Type Description
geometry T

A geometry which will be added to the current multi-geometry

Throws:

in case of invalid geometry argument

Type
H.lang.InvalidArgumentError

remove (geometry)T

Removes the specified geometry from the multi-geometry.

Name Type Description
geometry T

The geometry (by reference) to remove from this multi-geometry.

Returns:
Type Description
T the removed geometry or null if the geometry was not found

removeAt (index)T

Removes a contained geometry at the given index.

Name Type Description
index number

The index of the geometry to remove.

Throws:

if no geometry exists at the given index.

Type
H.lang.OutOfRangeError
Returns:
Type Description
T the removed geometry.

splice (index, opt_deleteCount, opt_items)Array.<!T>

This method splices the specified MultiGeometry at the provided index, removing the specified number of items at that index and inserting new items.

Returns:
Type Description
Array.<!T> the removed geometries.

toGeoJSON ()Object inherited

To obtain a GeoJSON representation of the given geometry.

Returns:
Type Description
Object A GeoJSON Geometry object representing the given geometry.

toString () inherited

To obtain a Well-Known-Text (WKT) representation of the geometry.

Was this article helpful?
TitleResults for “How to create a CRG?”Also Available inAlert