# Element Maps

**Element Maps** is Element's high-level Angular map component based on [OpenLayers](<https://openlayers.org/>). It provides points, grouping, clusters, labels, tooltips, and popovers out of the box.

## Usage

Use Element Maps when an application needs a ready-to-use map component with Element-specific behavior instead of assembling map features individually.

### When to use

- To display and group location points with a predefined Element presentation.
- When built-in clustering, labels, tooltips, or popovers are required.
- When a high-level component is preferable to direct interaction with a map library.

## Code

The `si-map` component uses the [OpenLayers](<https://openlayers.org/>) library. OpenLayers is a high-performance, feature-rich library for creating interactive geographical maps. It can display map tiles, vector data, and markers loaded from a wide range of sources.

The API documentation can be found in the official [OpenLayers API docs](<https://openlayers.org/en/latest/apidoc/>), with further useful examples on the [OpenLayers examples page](<https://openlayers.org/en/latest/examples/>). The source code is available in the [OpenLayers GitHub repository](<https://github.com/openlayers/openlayers>).

For cluster functionality and other additional features, [ol-ext](<https://viglino.github.io/ol-ext/>) is used. More information and documentation can be found in the [ol-ext GitHub repository](<https://github.com/Viglino/ol-ext>).

The OpenLayers [ol-mapbox-style](<https://github.com/openlayers/ol-mapbox-style>) library is used to create OpenLayers maps from Mapbox Style Specification objects.

### Usage

> [!NOTE]
>
> **Required Packages**
>
> - [ol](<https://www.npmjs.com/package/ol>)
> - [ol-ext](<https://www.npmjs.com/package/ol-ext>)
> - [ol-mapbox-style](<https://www.npmjs.com/package/ol-mapbox-style>)

```
npm install --save @siemens/maps-ng @siemens/map-styles

# Also install the needed peer dependencies
npm install --save ol ol-ext ol-mapbox-style
```

Add library assets and CommonJS dependencies in `angular.json` under the build options:

```
{
  "architect": {
    "build": {
      "options": {
        "assets": [
          {
            "glob": "**/*",
            "input": "./node_modules/@siemens/maps-ng/assets",
            "output": "/assets/"
          }
        ],
        "allowedCommonJsDependencies": [
          "xml-utils/find-tags-by-name.js",
          "xml-utils/get-attribute.js",
          "web-worker",
          "pbf",
          "earcut",
          "rbush"
        ]
      }
    }
  }
}
```

Import the OpenLayers styles into the main global stylesheet:

```
@use 'ol/ol.css';
```

Import `SiMapComponent` into the component that displays the map:

```
import { Component } from '@angular/core';
import { SiMapComponent } from '@siemens/maps-ng';

@Component({
  selector: 'app-map',
  imports: [SiMapComponent],
  template: '<si-map maptilerKey="REPLACE_WITH_YOUR_MAPTILER_KEY" />'
})
export class MapComponent {}
```

Provide a MapTiler key when using the default map style:

```
<si-map maptilerKey="REPLACE_WITH_YOUR_MAPTILER_KEY"></si-map>
```

### Features

#### Grouping

Points on the map can be grouped so they share the color provided in `groupColors`. While clustered, points are grouped in a donut chart.

To group points, specify the `group` property on a point object. The value of `group` is used to match the color from the default palette or `groupColors`, if provided. While `groupColors` is optional, the default color palette is `status`.

A custom color palette can be defined with the following code:

```
<si-map [points]="points" [groupColors]="{ 1: 'red', 2: 'green', 3: 'blue', 4: 'black'}"></si-map>
```

> [!WARNING]
>
> **Accessibility of custom colors**
>
> The usage of Element color definitions is strongly recommended to fulfill accessibility standards. Involve your UX specialist when using custom colors to ensure accessibility, especially important are appropriate contrasts for different themes.

To override a group color, specify a marker color on the point object itself:

```
const point: MapPoint = {
  name: 'Point 1',
  lon: 11,
  lat: 10,
  group: 1,
  marker: {
    color: 'orange'
  }
};
```

##### Examples

**Grouping with default status palette:**

```
<si-map [points]="points"></si-map>
```

```
const points: MapPoint[] = [
  {
    name: 'Point 1',
    lon: 11,
    lat: 10,
    group: 1 // $element-status-information
  },
  {
    name: 'Point 2',
    lon: 11,
    lat: 10,
    group: 2 // $element-status-success
  },
  {
    name: 'Point 3',
    lon: 11,
    lat: 10,
    group: 3 // $element-status-warning
  },
  {
    name: 'Point 4',
    lon: 11,
    lat: 10,
    group: 4 // $element-status-danger
  }
];
```

![Maps - Cluster Status Colors](<../images/maps-cluster-status-colors.png>)

**Grouping with Element palette colors:**

```
<si-map [points]="points" groupColors="element"></si-map>
```

```
const points: MapPoint[] = [
  {
    name: 'Point 1',
    lon: 11,
    lat: 10,
    group: 1 // $element-red-500 / 300 (depending on theme)
  },
  {
    name: 'Point 2',
    lon: 11,
    lat: 10,
    group: 2 // $element-orange-500
  },
  {
    name: 'Point 3',
    lon: 11,
    lat: 10,
    group: 3 // $element-blue-500
  },
  {
    name: 'Point 4',
    lon: 11,
    lat: 10,
    group: 4 // $element-yellow-500
  }
];
```

![Maps - Cluster Element Colors](<../images/maps-cluster-element-colors.png>)

#### Custom Mapbox style

The map appearance can be changed by passing a custom Mapbox style to the component as the `styleJson` input. In this case, `maptilerKey` is not needed as the custom style overrides it.

```
<si-map [styleJson]="styleJson"></si-map>
```

See the official [Mapbox documentation](<https://docs.mapbox.com/>) for more information.

#### Customize tooltip length

Customize the tooltip width with `maxLabelLength`:

```
<si-map
  class="flex-fill"
  [points]="points"
  [displayTooltipOnHover]="true"
  [maptilerKey]="maptilerKey"
>
  <si-map-tooltip [maxLabelLength]="50" />
</si-map>
```

### Map example

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject, viewChild } from '@angular/core';
import { LOG_EVENT } from '@siemens/live-preview';
import { MapPoint, SiMapComponent } from '@siemens/maps-ng';

import { environment } from '../../../environments/environment';
import { mockPoints } from '../../mocks/points.mock';

@Component({
  selector: 'app-sample',
  imports: [SiMapComponent],
  templateUrl: './si-map-default-style.html',
  host: { class: 'h-100 d-flex flex-column p-5' }
})
export class SampleComponent {
  logEvent = inject(LOG_EVENT);
  readonly map = viewChild.required(SiMapComponent);

  points: MapPoint[] = mockPoints;
  maptilerKey = environment.maptilerKey;
  styleJson = environment.maptilerUrl;

  refresh(): void {
    this.map().refresh(mockPoints);
  }

  select(): void {
    this.map().select(mockPoints[10]);
  }

  clear(): void {
    this.map().clear();
  }
}
```

Template:

```html
<si-map
  #map
  class="flex-fill"
  [points]="points"
  [markerAnimation]="true"
  [cluster]="true"
  [clusterDistance]="40"
  [displayTooltipOnHover]="true"
  [displayTooltipOnClusterHover]="true"
  [maptilerKey]="maptilerKey"
  [multiWorld]="false"
  [autoZoomClusterClick]="true"
  [autoZoomFeatureClick]="false"
  (pointsSelected)="logEvent('points', $event)"
/>

<div class="card mt-5 e2e-ignore">
  <div class="card-body">
    <button type="button" class="btn btn-secondary me-4" (click)="refresh()">
      Refresh points
    </button>
    <button type="button" class="btn btn-secondary me-4" (click)="select()">Select point</button>
    <button type="button" class="btn btn-secondary me-4" (click)="clear()">Clear map</button>
  </div>
</div>
```

### [SiMapComponent](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L82-L1219>)

**Kind:** component

**Selector:** `si-map`

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

```
component SiMapComponent implements AfterViewInit, OnChanges, OnDestroy, AfterViewChecked
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [alwaysShowLabels](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L268-L268>) | `boolean` | `false` | Show the label permanently next to the point. Normally the label is shown on hover or click. By enabling this it will always be visible next to the marker. |
| [autoZoomClusterClick](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L213-L213>) | `boolean` | `true` | When disabled, clusters will no longer automatically be zoomed to on click. |
| [autoZoomFeatureClick](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L207-L207>) | `boolean` | `false` | When enabled, features will be automatically zoom to on click. |
| [cluster](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L112-L112>) | `boolean` | `false` | Enable or disable clustering of points on the map. |
| [clusterClickZoom](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L195-L195>) | `number` | `DEFAULT_CLUSTER_CLICK_ZOOM` | Max zoom level for clicking on a cluster on the map. Defaults to 15. |
| [clusterDistance](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L175-L175>) | `number` | `DEFAULT_CLUSTER_DISTANCE` | Defines range in which points are clustered. In pixels. |
| [clusterPopoverComponent](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L222-L222>) | `Type<any> \| undefined` |  | Custom popover component for clustering |
| [displayPopoverOnClick](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L148-L148>) | `boolean` | `true` | Option to switch on/off the display of popover when clicked. Default set to true (on). |
| [displayPopoverOnHover](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L156-L156>) | `boolean` | `false` | Option to switch on/off popover when hovered. Default is set to false (off) |
| [displayTooltipOnClusterHover](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L169-L169>) | `boolean` | `false` | Option to switch on/off the display of tooltip while hovering over cluster. |
| [displayTooltipOnHover](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L141-L141>) | `boolean` | `false` | Option to switch on/off the display of tooltip while hovering over single point. |
| [featureClickZoom](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L189-L189>) | `number` | `DEFAULT_FEATURE_CLICK_ZOOM` | Max zoom level which is used when clicking on feature on the map. Defaults to 15. |
| [featureSelectZoom](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L182-L182>) | `number` | `DEFAULT_FEATURE_SELECT_ZOOM` | Zoom level when calling the `select()` method on the component. Defaults to 10. |
| [fitClusterPadding](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L240-L240>) | `[number, number, number, number]` | `[20, 20, 20, 20]` | Padding (in pixels) applied to the map view when zooming to a cluster, preventing points from being clipped at the edges. Specified as \[top, right, bottom, left\]. |
| [fitGeoJsonPadding](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L254-L254>) | `number[]` | `[20, 20, 20, 20]` | For GeoJson, padding (in pixels) to be cleared to fit the GeoJson inside the view after a click on it. Values in the array are: \[top, right, bottom, left\]. |
| [fitPointPadding](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L247-L247>) | `number[]` | `[20, 20, 20, 20]` | For Point geometry, padding (in pixels) to be cleared to fit the point inside the view after a click on it. Values in the array are: \[top, right, bottom, left\]. |
| [geoJson](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L90-L90>) | `any` |  | Payload of a geo-JSON object. |
| [geoJsonProjection](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L100-L100>) | `string` | `'EPSG:3857'` | Projection format used to render the geo-JSON payload. |
| [globalZoom](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L201-L201>) | `number` | `DEFAULT_GLOBAL_ZOOM` | Max zoom level on load or when clicking the reset button. Defaults to 5. |
| [groupColors](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L120-L120>) | `Record<number, string> \| ColorPalette` | `'status'` | Defines which colors should be used when points are grouped. Grouping means that points are painted with their group color and they are displayed as series in donut chart inside cluster. |
| [maptilerKey](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L163-L163>) | `string \| undefined` |  | Provide your key for MapTiler, this will use the default siemens element styles which can be used in both light and dark mode. Shouldn't be used together with styleJson. |
| [markerAnimation](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L106-L106>) | `boolean` | `false` | Enable or disable animation of markers. |
| [maxLabelLineLength](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L278-L278>) | `number` | `20` | Maximum number of characters per line for always displayed labels of a point. If the label exceeds this limit, it will be wrapped or trimmed. If set to 0, label trimming will be disabled. This setting is effective only when [alwaysShowLabels](<index.html#SiMapComponent.alwaysShowLabels>) is enabled. Important: Changing this is not recommended in most cases and may cause issues with positioning of the labels. |
| [maxLabelLines](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L287-L287>) | `number` | `3` | Maximum number of lines for always displayed labels of a point. If the label exceeds this limit, it will be trimmed. This setting is effective only when [alwaysShowLabels](<index.html#SiMapComponent.alwaysShowLabels>) is enabled and [maxLabelLineLength](<index.html#SiMapComponent.maxLabelLineLength>) is not 0. Important: Changing this is not recommended in most cases and may cause issues with positioning of the labels. |
| [multiWorld](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L260-L260>) | `boolean` | `true` | Show multiple worlds, including points that cross the 180th meridian. |
| [nativeProperties](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L127-L127>) | `OverlayNativeProperties \| undefined` |  | • **overlay**: Layer for popup element, an element to be displayed over the map and attached to a single map location.<br><br>• **controls**: List of controls to activate for map, additional controls like full screen, etc. can be added here. |
| [points](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L86-L86>) | `MapPoint[] \| undefined` |  | Points to be rendered on the map as features. |
| [popoverCloseOnClick](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L232-L232>) | `boolean` | `true` | Close the popover on click |
| [popoverComponent](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L217-L217>) | `Type<any> \| undefined` |  | Custom popover component |
| [popoverComponentProps](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L226-L226>) | `any` |  | Custom popover component |
| [styleFunction](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L94-L94>) | `StyleLike \| undefined` |  | Callback function to add custom styling to the drawn geo-JSON features. |
| [styleJson](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L134-L134>) | `any` |  | Type of background map, for example `'https://api.maptiler.com/maps/voyager/style.json?key=xxx'` (Token key is required). The styleJson defines the tiler source and the used styles for different layers, should only be used if the siemens default styles by using `maptilerKey` isn't good enough. |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [pointsChange](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L86-L86>) | `MapPoint[] \| undefined` | Points to be rendered on the map as features. |
| [pointsRefreshed](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L295-L295>) | `void` | Emitted when the points are available as features. So consumers can call methods like `zoomToPoints()` on the actual point list. |
| [pointsSelected](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/si-map.component.ts#L291-L291>) | `MapPoint[]` | Emitted when points on the map are selected or de-selected |

#### Methods

| Name | Type | Description |
| --- | --- | --- |
| **clear** | `clear() => void` | Remove all points from map. |
| **refresh** | `refresh(points: MapPoint[]) => void` | Updates the map with new set of points provided in argument. |
| **select** | `select(point: MapPoint) => void` | Zoom in the provided point and display popover with additional information. |

### MapTiler API key

Element Maps currently supports MapTiler as an OSM tile source. An API key is required to use this service. The API key is unique per project and its use is limited to certain URLs through an HTTP Origin Header allow-list.

As with most map services, commercial use of the API is a paid service and requires an account with an active subscription. Element does not provide such an account for all of Siemens.

### Testing

When running automated tests, do not load map tiles. This drastically reduces the number of MapTiler requests, which are limited by contract. Tests should cover the application's map functionality rather than the map data.

- **Unit tests:** Do not provide an API key.
- **Playwright tests:** Stub the `tiles.json` request and related requests using [`page.route(...)`](<https://github.com/siemens/element/tree/main/playwright/e2e/element-examples/maps/static.spec.ts>).

### Security considerations

The `description` of a map point can contain HTML and is rendered in the popover. Angular sanitizes this value. Do not pass untrusted content that was marked as trusted (e.g. via `bypassSecurityTrustHtml`). The point `name` is rendered as plain text.

### Types Documentation

### [ColorPalette](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/color-palette.type.ts#L6-L6>)

**Kind:** type alias

```
import type { ColorPalette } from '@siemens/maps-ng';
```

```
type ColorPalette = 'status' | 'element'
```

### [MapPoint](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L6-L15>)

**Kind:** interface

```
import type { MapPoint } from '@siemens/maps-ng';
```

```
interface MapPoint extends MapPointMetaData
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [description](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L25-L25>) (inherited) | `string` | Marker description, can be simple string or HTML as string<br><br>Inherited from [MapPointMetaData](<index.html#t:MapPointMetaData>) |
| [extraProperties](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L33-L33>) (optional, inherited) | `any` | Extra properties to be passed along (click function consumes it)<br><br>Inherited from [MapPointMetaData](<index.html#t:MapPointMetaData>) |
| [group](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L38-L38>) (optional, inherited) | `number` | 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<br><br>Inherited from [MapPointMetaData](<index.html#t:MapPointMetaData>) |
| [lat](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L10-L10>) | `number` | Latitude value for marker |
| [lon](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L14-L14>) | `number` | Longitude value for marker |
| [marker](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L29-L29>) (optional, inherited) | `MarkerOptions` | Marker style<br><br>Inherited from [MapPointMetaData](<index.html#t:MapPointMetaData>) |
| [name](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L21-L21>) (inherited) | `string` | Marker name<br><br>Inherited from [MapPointMetaData](<index.html#t:MapPointMetaData>) |

#### Methods

##### click

[Source for click](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L42-L42>)

**Modifiers:** optional, inherited

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

Inherited from [MapPointMetaData](<index.html#t:MapPointMetaData>)

```
click(extraProperties?: any): void
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [extraProperties](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L42-L42>) (optional) | `any` |  |  |

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

### [OverlayNativeProperties](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/overlay-native-properties.interface.ts#L8-L18>)

**Kind:** interface

```
import type { OverlayNativeProperties } from '@siemens/maps-ng';
```

```
interface OverlayNativeProperties
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [controls](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/overlay-native-properties.interface.ts#L17-L17>) (optional) | `Control[]` | List of controls to activate for map, additional controls like full screen, etc. can be added here Defaults are zoom in and out |
| [overlay](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/overlay-native-properties.interface.ts#L12-L12>) (optional) | `Overlay` | Layer for popup element, an element to be displayed over the map and attached to a single map location. |

### [DEFAULT\_CLUSTER\_DISTANCE](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/constants.ts#L19-L19>)

**Kind:** constant

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

```
number = 40
```

### [DEFAULT\_FEATURE\_SELECT\_ZOOM](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/constants.ts#L15-L15>)

**Kind:** constant

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

```
number = 10
```

### [DEFAULT\_FEATURE\_CLICK\_ZOOM](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/constants.ts#L16-L16>)

**Kind:** constant

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

```
number = 15
```

### [DEFAULT\_CLUSTER\_CLICK\_ZOOM](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/constants.ts#L17-L17>)

**Kind:** constant

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

```
number = 15
```

### [DEFAULT\_GLOBAL\_ZOOM](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/constants.ts#L18-L18>)

**Kind:** constant

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

```
number = 5
```

### [MarkerOptions](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L57-L75>)

**Kind:** interface

```
import type { MarkerOptions } from '@siemens/maps-ng';
```

```
interface MarkerOptions
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [color](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L66-L66>) (optional) | `string` | Color of the marker, HEX or css compliant color value. Only use when a semantic status isn't working for the use-case. |
| [icon](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L74-L74>) (optional) | `IconMarkerOptions` | Icon options |
| [status](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L70-L70>) (optional) | `MarkerStatusType` | Semantic status for coloring. This is also theme-aware. |
| [type](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L61-L61>) | `"status" \| "icon" \| "dot"` | Visual representation of marker |

### [MapPointMetaData](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L17-L43>)

**Kind:** interface

```
import type { MapPointMetaData } from '@siemens/maps-ng';
```

```
interface MapPointMetaData
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [description](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L25-L25>) | `string` | Marker description, can be simple string or HTML as string |
| [extraProperties](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L33-L33>) (optional) | `any` | Extra properties to be passed along (click function consumes it) |
| [group](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L38-L38>) (optional) | `number` | 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 |
| [marker](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L29-L29>) (optional) | `MarkerOptions` | Marker style |
| [name](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L21-L21>) | `string` | Marker name |

#### Methods

##### click

[Source for click](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L42-L42>)

**Modifiers:** optional

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

```
click(extraProperties?: any): void
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [extraProperties](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L42-L42>) (optional) | `any` |  |  |

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

### [MarkerStatusType](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L47-L48>)

**Kind:** type alias

```
import type { MarkerStatusType } from '@siemens/maps-ng';
```

```
type MarkerStatusType = 'success' | 'info' | 'warning' | 'danger' | 'caution' | 'critical' | 'default' | 'unknown'
```

### [IconMarkerOptions](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L77-L86>)

**Kind:** interface

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

```
interface IconMarkerOptions
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [scale](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L85-L85>) (optional) | `number` | Scale value for marker |
| [src](<https://github.com/siemens/element/blob/main/projects/maps-ng/src/components/si-map/models/map-point.interface.ts#L81-L81>) (optional) | `string` | Path to the icon image |
