AbstractStaticbufferThe extent to check and buffer
Buffer size in map units (default: 5000)
Buffered extent
StaticcalculateCalculates distance along a path define by array of Coordinates.
Array of coordinates
Input projection (EPSG:4326, EPSG:3978, ESPG:3857)
Output projection (EPSG:3978, ESPG:3857)
The total distance in kilometers and distance for each section
StaticconvertConverts a TypeFeatureStyle to an Open Layers Style object.
Optionalstyle: TypeFeatureStyleOptional feature style to convert
An Open Layers styling for drawing on a map
StaticcoordFormat the coordinates for degrees - minutes - seconds (lat, long).
The value to format
The formatted value
StaticcreateCreate empty basemap tilelayer to use as initial basemap while we load basemap so the viewer will not fails if basemap is not avialable.
The created empty basemap
StaticensureEnsures a service URL includes standardized OGC parameters (SERVICE, REQUEST, VERSION),
overriding any existing ones with the correct casing and values.
The function normalizes query parameter keys, removes lowercase variants (service, request),
and ensures the final URL contains correctly capitalized parameters with the specified values.
If the VERSION parameter is missing, a default value is added.
The input service URL, which may be absolute or relative
The OGC service type (e.g., "WMS", "WFS", "WMTS")
The OGC request type (e.g., "GetMap", "GetFeature", "GetCapabilities")
The default service version to enforce if not already present
The normalized and fully qualified service request URL
StaticensureBuilds a complete DescribeFeatureType URL for a WFS service.
The base WFS service URL
The layer or feature type name to describe
The WFS version
Optional output format (e.g., "application/json", "text/xml")
A fully qualified DescribeFeatureType request URL
StaticensureBuilds a complete GetCapabilities URL for a specific OGC service.
The base service URL
The service type (e.g., "WMS", "WFS")
Optionallayers: stringOptional layer name(s) to include in the request
A fully qualified GetCapabilities request URL
StaticensureBuilds a complete GetFeature URL for a WMS/WFS service.
The base WFS service URL
The layer or feature type name to request
The WFS version
Optional output format (e.g., "application/json")
A fully qualified GetFeature request URL
StaticensureBuilds a complete GetLegendGraphic URL for a WMS service.
The base WMS service URL
The layer name for which to retrieve the legend
The WMS version
Optional image format for the legend (e.g., "image/png")
A fully qualified GetLegendGraphic request URL
StaticensureBuilds a complete GetStyles URL for a WMS service.
The base WMS service URL
Optionallayers: stringOptional layer name(s) to include in the request
Optionalversion: stringOptional WMS version
A fully qualified GetStyles request URL
StaticensureRemoves specified query parameters from a URL, preserving all others.
This method normalizes a URL by stripping out any query parameters whose
keys match the ones provided in removeParams. It works even if the URL
contains multiple ? or & characters (e.g., proxy-wrapped URLs).
The URL to normalize
Array of parameter names (case-insensitive) to remove from the URL
The normalized URL with the specified parameters removed
StaticesriConverts an esri geometry type string to a TypeStyleGeometry.
The esri geometry type to convert
The corresponding TypeStyleGeometry
StaticextentConverts an extent to a polygon.
The extent to convert
The created polygon
StaticgeojsonReturns the Geometry representation of a given geojson.
The geojson
Read options to convert the geojson to a geometry
The Geometry representation of the geojson, or undefined if no geojson is provided
StaticgeometriesFunction for checking if two geometries have the same coordinates.
Note: will return false for geometry collections.
The first geometry
The second geometry
Whether the two geometries are equal or not
StaticgeometryReturns the WKT representation of a given geometry.
The geometry
The WKT representation of the geometry, or undefined if no geometry is provided
StaticgetGets the area of a given geometry.
The geometry to calculate the area
The area of the given geometry
StaticgetExtracts the base URL (origin + pathname) from a full URL string, removing any query parameters, hash fragments, or authentication data.
The full URL string to process
The normalized base URL consisting of the origin and pathname
StaticgetDefault drawing style for GeoView.
OptionalstrokeColor: string | ColorOptional stroke color
OptionalstrokeWidth: numberOptional stroke width
OptionalfillColor: string | ColorOptional fill color
An Open Layers styling for drawing on a map
StaticgetFetch the json response from the ESRI map server to get REST endpoint metadata.
The url of the ESRI map server
A promise that resolves with the JSON metadata from the server
StaticgetReturns the intersection of 2 extents.
First extent
OptionalextentB: ExtentOptional second extent
The intersection of the extents, or undefined if both are undefined
StaticgetReturns the union of 2 extents.
First extent
OptionalextentB: ExtentOptional second extent
The union of the extents, or undefined if both are undefined
StaticgetGenerates legend layer icon metadata from a layer legend definition.
This method extracts icon imagery and legend item details from the provided
layerLegend, handling both vector and non-vector legends.
Behavior:
toDataURL().simple and categorized style configurations.iconList of TypeLegendItem entries per geometry type.iconImage as the primary icon (first legend item)iconImageStacked as the secondary icon when multiple entries existlayerLegend.legend.'no data' if no canvas is available.
Notes:true unless explicitly set to false.undefined if layerLegend is null or undefined.The layer schema type used to determine whether the legend should be interpreted as vector-based.
The legend configuration object associated with the layer.
An array of legend layer item metadata containing icon images and legend entries,
or undefined if no legend is provided.
StaticgetExtracts and normalizes legend items from a collection of legend layer icons.
This method:
iconList entries from the provided legend layer items.imageStatic and GeoTIFF) by dynamically
creating a legend item using the iconImage property.
For imageStatic and GeoTIFF schema tags, if at least one icon is present,
an additional legend item is created with:geometryType set to 'Point'name set to 'image'icon set from icons[0].iconImageisVisible set to trueThe layer schema type used to determine
special handling logic (e.g., 'imageStatic', 'GeoTIFF').
The list of legend layer items containing
optional iconList collections and optional iconImage values.
A flattened array of legend items derived from the provided icons, including any dynamically generated items for special layer types.
StaticgetGets the length of a given geometry.
The geometry to calculate the length
The length of the given geometry
StaticgetStaticgetGets meters per pixel for different projections.
The projection of the map
The resolution of the map
Optionallat: numberOptional latitude, only needed for Web Mercator
Number representing meters per pixel
StaticgetStaticgetGets the pointer position information from a Map Event and a specified projection.
The map event
The map projection code
An object representing pointer position information
StaticgetFetch the json response from the XML response of a WMS getCapabilities request.
The url the url of the WMS server
Optionallayers: stringThe layers to query separate by
OptionalcallbackNewMetadataUrl: CallbackNewMetadataDelegateOptional callback executed when a proxy had to be used to fetch the metadata. The parameter sent in the callback is the proxy prefix with the '?' at the end.
OptionalabortSignal: AbortSignalOptional AbortSignal used to cancel the layer creation process
A promise that resolves with the parsed WMS metadata
StaticgetFetch the json response from the XML response of a WMS getCapabilities request.
The url the url of the WMS server
OptionalcallbackNewMetadataUrl: CallbackNewMetadataDelegateOptional callback executed when a proxy had to be used to fetch the metadata. The parameter sent in the callback is the proxy prefix with the '?' at the end.
OptionalabortSignal: AbortSignalOptional AbortSignal used to cancel the layer creation process
A promise that resolves with the capabilities XML as a string
StaticgetFetch the json response from the XML response of a WMS getCapabilities request.
The url the url of the WMS server
Optionallayers: stringThe layers to query separate by
OptionalcallbackNewMetadataUrl: CallbackNewMetadataDelegateOptional callback executed when a proxy had to be used to fetch the metadata. The parameter sent in the callback is the proxy prefix with the '?' at the end.
OptionalabortSignal: AbortSignalOptional AbortSignal used to cancel the layer creation process
A promise that resolves with the parsed WMS styles
StaticgetFetch the json response from the XML response of a WMS getCapabilities request.
The url the url of the WMS server.
Optionallayers: stringThe layers to query separate by.
OptionalabortSignal: AbortSignalOptional abort signal to handle cancelling of the process.
A promise that resolves with the parsed WMTS metadata
StaticisChecks if a given extent is long/lat.
The extent to check
Whether or not the extent is long/lat
StaticisChecks whether a given value is a valid GeoJSON FeatureCollection object.
The value to test (can be any type)
True if the value appears to be a GeoJSON FeatureCollection, otherwise false
StaticisCheck if a point is contained in an extent.
The point
The extent
True if point is within the extent, false otherwise
StaticisType guard function that redefines a TypeLegend as a TypeVectorLegend if the type attribute of the verifyIfLegend parameter is valid.
The type ascention applies only to the true block of the if clause.
Object to test in order to determine if the type ascention is valid
True if the payload is valid
StaticpolygonConverts a polygon to an extent.
The polygon to convert
The created extent
StaticreadExtracts the EPSG code from a GeoJSON object's CRS definition.
Accepts either a GeoJSON object or a JSON string. If the GeoJSON contains
a crs entry with a properties.name field in the form
"urn:ogc:def:crs:EPSG::<code>", it is normalized to "EPSG:<code>".
A GeoJSON object or a JSON string representing one
The normalized EPSG code (e.g., "EPSG:3005"), or undefined if the CRS is not defined
StaticreadExtracts the EPSG code from a GML object's CRS definition.
Accepts either a GML object or an XML string. If the GML contains
an element with a srsName attribute in the form
"urn:ogc:def:crs:EPSG::<code>", it is normalized to "EPSG:<code>".
A GML object or an XML string representing one
The normalized EPSG code (e.g., "EPSG:3005"), or undefined if the CRS is not defined
StaticreadReads OpenLayers features from an Esri features object.
The Features data to read
Optional read options such as projection or extent
An array of parsed OpenLayers Feature and whether there were any invalid geometries
StaticreadReads OpenLayers features from a GeoJSON object.
The GeoJSON data to read
Optional read options such as projection or extent
An array of parsed OpenLayers Feature instances
StaticreadReads OpenLayers features from a KML object.
The KML data to read
Optional read options such as projection or extent
An array of parsed OpenLayers Feature instances
StaticreadReads OpenLayers features from an WFS features object.
The Features data to read
The WFS version
Optional read options such as projection or extent
An array of parsed OpenLayers Feature instances
StaticreadReads OpenLayers features from a WKBObject object.
The WKBObject data to read
Optional read options such as projection or extent
An array of parsed OpenLayers Feature instances
StaticreplaceReplaces or adds the BBOX parameter in a WMS GetMap URL.
The original WMS GetMap URL
The new CRS
The new BBOX to set, as an array of 4 numbers: [minX, minY, maxX, maxY]
A new URL string with the updated BBOX parameter
StaticvalidateChecks validity of lat long, LCC, or Web Mercator extent and updates values if invalid.
The extent to validate
The projection code of the extent. Default EPSG:4326
The validated extent
StaticvalidateValidates lat long, LCC, or Web Mercator extent if it is defined.
The extent to validate
The projection code of the extent. Default EPSG:4326
The validated extent if it was defined, or undefined
StaticwfsConverts a WFS geometry type string to a TypeStyleGeometry.
The wfs geometry type to convert
The corresponding TypeStyleGeometry
StaticwktReturns the Geometry representation of a given wkt.
The well known text
Read options to convert the wkt to a geometry
The Geometry representation of the wkt, or undefined if no wkt is provided
StaticwriteSerializes an OpenLayers geometry into a GML3 string.
This method uses the OpenLayers GML3 format to convert the provided
Geometry object into a GML XML string, using the specified spatial
reference system (srsName).
The OpenLayers geometry to serialize
The spatial reference system (e.g., 'EPSG:3857') to assign to the GML geometry
The serialized GML geometry as a string
Apply buffer to extent.