Constructs a Geometry class and creates a geometry group in the process.
a reference to the map viewer
Reference on the map viewer
Create a new circle
long lat coordinate of the circle
Optionaloptions: {circle options including styling
OptionaloptionalFeatureId: stringan optional id to be used to manage this geometry
OptionalgroupId: stringan optional group id in witch we want to add the geometry
a geometry containing the id and the created geometry
Create a new marker icon
the long lat position of the marker
Optionaloptions: {marker options including styling
OptionaloptionalFeatureId: stringan optional id to be used to manage this geometry
OptionalgroupId: stringan optional group id in witch we want to add the geometry
a geometry containing the id and the created geometry
Create a new polygon
array of points to create the polygon
Optionaloptions: {polygon options including styling
OptionaloptionalFeatureId: stringan optional id to be used to manage this geometry
OptionalgroupId: stringan optional group id in witch we want to add the geometry
a geometry containing the id and the created geometry
Create a polyline using an array of lon/lat points
points of lon/lat to draw a polyline
Optionaloptions: {polyline options including styling
Optionalid: stringan optional id to be used to manage this geometry
OptionalgroupId: stringan optional group id in witch we want to add the geometry
a geometry containing the id and the created geometry
Add a new geometry to the group whose identifier is equal to geometryGroupId. if geometryGroupId is not provided, use the active geometry group. If the geometry group doesn't exist, create it.
the geometry to be added to the group
OptionalgeometryGroupId: stringoptional id of the group to add the geometry to
Create a new geometry group to manage multiple geometries at once
the id of the group to use when managing this group
Optionaloptions: {an optional vector layer and vector source options
created geometry group
Delete all geometries from the geometry group but keep the group If geometryGroupid is not provided, the active geometry group is used.
OptionalgeometryGroupid: stringoptional group id
the group with empty layers
Delete a feature using the id and delete it from the groups and the map
the id of the feature to delete
Delete a specific feature from a group using the feature id If geometryGroupid is not provided, the active geometry group is used.
the feature id to be deleted
OptionalgeometryGroupid: stringoptional group id
Find the groups that the feature exists in and delete the feature from those groups
the geometry id
Delete a geometry group and all the geometries from the map. If geometryGroupid is not provided, the active geometry group is used. The default geometry group can't be deleted.
OptionalgeometryGroupid: stringoptional id of the geometry group to delete
Get the active geometry group
the active geometry group
Get the coordinates of a specific feature
the id of the feature
Optionalprojection: numberoptional, transform the coordinates to the provided projection. Otherwise, uses the map's projection by default
the coordinates of the feature
Find a feature using it's id
the id of the feature to return
a feature having the specified id
Get the geometry group by using the ID specified when the group was created if geometryGroupid is not provided, return the active geometry group
OptionalgeometryGroupId: stringthe id of the geometry group to return
the geomtry group
Find the groups that contain the geometry using it's id
the id of the geometry
the groups that contain the geometry
Unregisters a geometry added event handler.
The callback to stop being called whenever the event is emitted
Registers a geometry added event handler.
The callback to be executed whenever the event is emitted
set the active geometry group (the geometry group used when adding geometries). If id is not specified, use the default geometry group.
Optionalid: stringoptional the id of the group to set as active
Allows for a feature's coordinates to be updated programatically.
the id of the feature to return
The new coordinates for the feature
Optionalprojection: numberoptional, the projection of the coordinates, assumes 4326 if not specified
hide the identified geometry group from the map if groupId is not provided, use the active geometry group
OptionalgeometryGroupId: stringoptional the id of the group to show on the map
Show the identified geometry group on the map if geometryGroupId is not provided, use the active geometry group
OptionalgeometryGroupId: stringoptional the id of the group to show on the map
StaticcreateCreates a Geometry given a geometry type and coordinates expected in any logical format.
The geometry type to create
The coordinates to use to create the geometry
The OpenLayers Geometry
StaticisTypeguards when a list of coordinates should actually be a single coordinate, such as a MultiPolygon.
The coordinates to check
when the coordinates represent a MultiPolygon
StaticisTypeguards when a list of coordinates should actually be a single coordinate, such as a MultiLineString or Polygon.
The coordinates to check
when the coordinates represent a MultiLineString or Polygon
StaticisTypeguards when a list of coordinates should actually be a single coordinate, such as a LineString.
The coordinates to check
when the coordinates represent a LineString
StaticisTypeguards when a list of coordinates should actually be a single coordinate, such as a Point.
The coordinates to check
when the coordinates represent a Point
Class used to manage vector geometries (Polyline, Polygon, Circle, Marker...)
Exports
GeometryApi