Class: Point

OSDPaperjsAnnotation.Point(geoJSON)

Represents a point annotation item.

Constructor

new Point(geoJSON)

The `Point` class represents a point annotation item. It inherits from the `AnnotationItem` class and provides methods to work with point annotations.
Parameters:
Name Type Description
geoJSON Object The GeoJSON object containing annotation data.
Properties:
Name Type Description
_paperItem paper.Group The associated paper item representing the point.
Source:

Extends

  • AnnotationItem

Methods

getCoordinates() → {Array}

This method returns an array of coordinates representing the position of the point.
Source:
Returns:
An array containing the x and y coordinates.
Type
Array

getGeoJSONType() → {Object}

Get the type of this object.
Source:
Returns:
with fields `type === 'Point'`
Type
Object

getStyleProperties() → {Object}

This method returns the style properties of the point in JSON format.
Source:
Returns:
The style properties in JSON format.
Type
Object

setStyle(props)

This method sets the style properties of the point using the provided properties object.
Parameters:
Name Type Description
props Object The style properties to set.
Source:

(static) onTransform(operation)

This static method performs actions during a transformation on the point, such as rotation or scaling. It handles both rotation and scaling transformations of the point annotation.
Parameters:
Name Type Description
operation string The type of transformation operation.
Source:

(static) supportsGeoJSONType(type, subtypeopt) → {Boolean}

Retrieves the supported types by the Point annotation item.
Parameters:
Name Type Attributes Default Description
type String
subtype String <optional>
null
Source:
Returns:
Whether this constructor supports the requested type/subtype
Type
Boolean