Skip to content

MapService documentation

import { MapService } from '@siemens/maps-ng';

Attributes and Methods

NameTypeDescription
clusterLayer()
(features: Feature<Geometry, { [x: string]: any; }>[], markerAnimation: boolean, clusterDistance: number, multiWorld: boolean) => Layer<Source, default<any>, { [x: string]: any; }>

Initialize animated cluster layer for points if clustering is enabled

Parameters
createFeatures()
(points: MapPoint[], alwaysShowLabels?: boolean = false) => Feature<Geometry, { [x: string]: any; }>[]

Create feature with parameters

Parameters
getClusterStyle()
(feature: Feature<Geometry, { [x: string]: any; }>) => Style[]

Cluster styling

Parameters
getFeatureStyle()
(feature: Feature<Geometry, { [x: string]: any; }>, cluster: boolean, features: Feature<Geometry, { [x: string]: any; }>[], dummy?: boolean = false) => Style[]

Separate feature styling with icon

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

Create vector layer when clustering is disabled

Parameters

Types Documentation

ColorPalette

'status' | 'element'
type alias
import type { ColorPalette } from '@siemens/maps-ng';
import type { ColorPalettes } from '@siemens/maps-ng';
import type { MapPoint } from '@siemens/maps-ng';
Properties
Methods

MarkerStatusType

'success' | 'info' | 'warning' | 'danger' | 'caution' | 'critical' | 'default' | 'unknown'
type alias
import type { MarkerStatusType } from '@siemens/maps-ng';
import type { MarkerOptions } from '@siemens/maps-ng';
Properties
import type { MapPointMetaData } from '@siemens/maps-ng';
Properties
Methods
  • click? (extraProperties?: any) => void

    Click functionality, do any extra staff when clicking on the point, just create needed logic for click functionality

    Parameters
import type { IconMarkerOptions } from '@siemens/maps-ng';
Properties

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