Skip to content

MapService documentation

provided in root

Attributes and Methods

NameTypeDefaultDescription
clusterLayer(...)
(features: Feature<Geometry>[], markerAnimation: boolean, clusterDistance: number, multiWorld: boolean) => LayerInitialize animated cluster layer for points if clustering is enabled

Parameters
  • features: Feature<Geometry>[]  for the source
  • markerAnimation: boolean  animation value for markers
  • clusterDistance: number  number distance between clusters
  • multiWorld: boolean  boolean if points should be repeated on multiple world maps
createFeatures(...)
(points: MapPoint[], alwaysShowLabels: boolean = false) => Feature<Geometry>[]Create feature with parameters

Parameters
getClusterStyle(...)
(feature: Feature) => Style[]Cluster styling

Parameters
getFeatureStyle(...)
(feature: Feature, cluster: boolean, features: Feature<Geometry>[], dummy: boolean = false) => Style[]Separate feature styling with icon

Parameters
getLabelStyle(...)
(feature: Feature<Point>, features: Feature<Point>[], maxLabelLength: number, maxLines: number, clusterSource: Cluster<Feature<Point>>, dummy: boolean = false) => Style[]Parameters
getMarkerOffset(...)
(feature: Feature) => [ number, number ]Parameters
getMarkerSize(...)
(feature: Feature) => [ number, number ]Parameters
labelLayer(...)
(features: Feature<Geometry>[], multiWorld: boolean, maxLabelLength: number, maxLines: number, clusterLayer: Layer<Source, LayerRenderer<any>>) => VectorLayer<VectorSource<Feature<Geometry>>>Parameters
resetCaches()
() => void
setTheme(...)
(groupColors: (undefined | Record<number, string> | ColorPalette)) => voidParameters
setZoomCallback(...)
(callback: () => (undefined | number)) => voidParameters
(readonly) theme
{ colorPalette: ColorPalettes, defaultMarkerColor: string, fillColor: string, status: Record<MarkerStatusType, string>, strokeColor: string, textColor: string }
vectorLayer(...)
(features: Feature<Geometry>[], multiWorld: boolean, defaultStyle: boolean = false) => VectorLayer<VectorSource<Feature<Geometry>>>Create vector layer when clustering is disabled

Parameters
  • features: Feature<Geometry>[]  list of Features
  • multiWorld: boolean  boolean if points should be repeated on multiple world maps
  • defaultStyle: boolean = false

Types Documentation

import
imported from ol
import
imported from ol
imported from ol
import
imported from ol
imported from ol
imported from ol
Properties
Marker description, can be simple string or HTML as string
description: string from description
Extra properties to be passed along (click function consumes it)
extraProperties?: any from extraProperties
If you want your point to be clustered by it's group, you need to set the group id here for this point Color with the same id will be assigned. Must be higher than 0
group?: number from group
Latitude value for marker
lat: number
Longtitude value for marker
lon: number
Marker style
marker?: MarkerOptions from marker
Marker name
name: string from name
Methods
(extraProperties: any) => void from click
Click functionality, do any extra staff when clicking on the point, just create needed logic for click functionality
Parameters
extraProperties?: any
import
imported from ol
import
imported from ol
import
imported from ol
imported from ol
("status" | "element")
Properties
Marker description, can be simple string or HTML as string
description: string
Extra properties to be passed along (click function consumes it)
extraProperties?: any
If you want your point to be clustered by it's group, you need to set the group id here for this point Color with the same id will be assigned. Must be higher than 0
group?: number
Marker style
marker?: MarkerOptions
Marker name
name: string
Methods
(extraProperties: any) => void
Click functionality, do any extra staff when clicking on the point, just create needed logic for click functionality
Parameters
extraProperties?: any
("success" | "info" | "warning" | "danger" | "caution" | "critical" | "default" | "unknown")
Properties
Color of the marker, HEX or css compliant color value. Only use when a semantic status isn't working for the use-case.
color?: string
Icon options
icon?: IconMarkerOptions
Semantic status for coloring. This is also theme-aware.
status?: MarkerStatusType
Visual representation of marker
type: ("status" | "icon" | "dot")
Properties
Scale value for marker
scale?: number
Path to the icon image
src?: string

Except where otherwise noted, content on this site is licensed under MIT License.