@siemens/maps-ng 47.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/LICENSE.md +20 -0
  2. package/README.md +119 -0
  3. package/assets/default-marker-icon.svg +9 -0
  4. package/assets/marker-default.svg +7 -0
  5. package/components/si-map/components/index.d.ts +6 -0
  6. package/components/si-map/components/si-map-popover/si-map-popover-cluster-template.directive.d.ts +9 -0
  7. package/components/si-map/components/si-map-popover/si-map-popover-template.directive.d.ts +9 -0
  8. package/components/si-map/components/si-map-popover/si-map-popover.component.d.ts +25 -0
  9. package/components/si-map/components/si-map-tooltip/si-map-tooltip.component.d.ts +39 -0
  10. package/components/si-map/index.d.ts +9 -0
  11. package/components/si-map/models/color-palette.type.d.ts +9 -0
  12. package/components/si-map/models/constants.d.ts +32 -0
  13. package/components/si-map/models/grouping.model.d.ts +13 -0
  14. package/components/si-map/models/index.d.ts +9 -0
  15. package/components/si-map/models/map-point.interface.d.ts +78 -0
  16. package/components/si-map/models/overlay-native-properties.interface.d.ts +17 -0
  17. package/components/si-map/services/SelectCluster.d.ts +16 -0
  18. package/components/si-map/services/map.service.d.ts +85 -0
  19. package/components/si-map/shared/themes/element.d.ts +17 -0
  20. package/components/si-map/shared/themes/marker.d.ts +7 -0
  21. package/components/si-map/shared/themes/style.d.ts +5 -0
  22. package/components/si-map/si-map.component.d.ts +406 -0
  23. package/components/si-map/si-map.module.d.ts +9 -0
  24. package/fesm2022/siemens-maps-ng-translate.mjs +21 -0
  25. package/fesm2022/siemens-maps-ng-translate.mjs.map +1 -0
  26. package/fesm2022/siemens-maps-ng.mjs +4895 -0
  27. package/fesm2022/siemens-maps-ng.mjs.map +1 -0
  28. package/index.d.ts +5 -0
  29. package/package.json +50 -0
  30. package/projects/maps-ng/README.md +119 -0
  31. package/public-api.d.ts +7 -0
  32. package/public-api.module.d.ts +8 -0
  33. package/translate/index.d.ts +6 -0
  34. package/translate/package.json +3 -0
  35. package/translate/si-translatable-keys.interface.d.ts +7 -0
  36. package/translate/si-translatable-overrides.provider.d.ts +7 -0
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@siemens/maps-ng" />
5
+ export * from './public-api';
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@siemens/maps-ng",
3
+ "description": "Element maps library based on OpenLayers.",
4
+ "version": "47.11.0",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+ssh://git@github.com/siemens/element.git"
9
+ },
10
+ "author": {
11
+ "name": "Siemens AG",
12
+ "email": "info@siemens.com"
13
+ },
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "homepage": "https://github.com/siemens/element",
18
+ "bugs": "https://github.com/siemens/element/issues/new",
19
+ "type": "module",
20
+ "peerDependencies": {
21
+ "@angular/common": "19 - 20",
22
+ "@angular/core": "19 - 20",
23
+ "ol": "~10.2.1",
24
+ "ol-ext": "^4.0.24",
25
+ "ol-mapbox-style": "^12.4.0",
26
+ "@siemens/element-translate-ng": "47.11.0"
27
+ },
28
+ "exports": {
29
+ "./docs.json": {
30
+ "default": "./docs.json"
31
+ },
32
+ "./package.json": {
33
+ "default": "./package.json"
34
+ },
35
+ ".": {
36
+ "types": "./index.d.ts",
37
+ "default": "./fesm2022/siemens-maps-ng.mjs"
38
+ },
39
+ "./translate": {
40
+ "types": "./translate/index.d.ts",
41
+ "default": "./fesm2022/siemens-maps-ng-translate.mjs"
42
+ }
43
+ },
44
+ "module": "fesm2022/siemens-maps-ng.mjs",
45
+ "typings": "index.d.ts",
46
+ "sideEffects": false,
47
+ "dependencies": {
48
+ "tslib": "^2.3.0"
49
+ }
50
+ }
@@ -0,0 +1,119 @@
1
+ # Element Maps
2
+
3
+ Element maps library based on OpenLayers.
4
+
5
+ ## Usage
6
+
7
+ To use this library in other projects, add it to your dependencies using:
8
+
9
+ ```sh
10
+ npm install --save @siemens/maps-ng
11
+
12
+ # Also install the needed peer dependencies
13
+ npm install --save ol@~10.2.0 ol-ext ol-mapbox-style
14
+ ```
15
+
16
+ Add library assets and CommonJs dependencies in your _angular.json_ under the build options
17
+
18
+ ```json
19
+ {
20
+ "architect": {
21
+ "build": {
22
+ "options": {
23
+ "assets": [
24
+ // ... other assets
25
+ {
26
+ "glob": "**/*",
27
+ "input": "./node_modules/@siemens/maps-ng/assets",
28
+ "output": "/assets/"
29
+ }
30
+ ],
31
+ // ... other options
32
+ "allowedCommonJsDependencies": [
33
+ "xml-utils/find-tags-by-name.js",
34
+ "xml-utils/get-attribute.js",
35
+ "web-worker",
36
+ "pbf",
37
+ "earcut",
38
+ "rbush"
39
+ ]
40
+ }
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ Import openlayers styles into your main global stylesheet
47
+
48
+ ```scss
49
+ @use 'ol/ol.css';
50
+ ```
51
+
52
+ Add the library to the list of _imports_ in your Angular _AppModule_ like this:
53
+
54
+ ```ts
55
+ // [...]
56
+
57
+ // Import this library and required dependencies
58
+ import { SiMapModule } from '@siemens/maps-ng';
59
+
60
+ @NgModule({
61
+ declarations: [AppComponent],
62
+ imports: [
63
+ BrowserModule,
64
+
65
+ // Import this library
66
+ SiMapModule
67
+ ],
68
+ bootstrap: [AppComponent]
69
+ })
70
+ export class AppModule {}
71
+ ```
72
+
73
+ Or simply _import_ the `SiMapComponent` in your standalone component.
74
+
75
+ ```ts
76
+ @Component({
77
+ selector: 'app-map',
78
+ standalone: true,
79
+ imports: [SiMapComponent],
80
+ templateUrl: './sample.component.html',
81
+ host: { class: 'h-100' }
82
+ })
83
+ export class SampleComponent {}
84
+ ```
85
+
86
+ And lastly, add the map to your template and add a MapTiler key.
87
+ Note, the map has not height per default and comes with a `block`
88
+ display. Set the height or put it in a related container.
89
+
90
+ The demo key works on localhost. It will be renewed regularly
91
+ to avoid missuses of the key. Contact the SiMPL team to receive
92
+ a key for your SI BP product.
93
+
94
+ ```html
95
+ <si-map [maptilerKey]="'REPLACE_WITH_YOUR_MAPTILER_KEY'" style="height: 500px;"></si-map>
96
+ ```
97
+
98
+ ### Testing
99
+
100
+ Do **not** load map data (tiles) from maptiler in automated tests, to reduce the number of
101
+ payed requests to a minimum. E.g. during testing, you want to test your functions and not the
102
+ tile data provided by maptiler.
103
+
104
+ - **Unit tests:** Do simply **not** provide an API key during
105
+ - **Playwright tests:** Stub the `tiles.json` request (and some others) using [page.route(...)](playwright/e2e/simpl-element/maps/static.spec.ts).
106
+
107
+ ### Running Unit Tests
108
+
109
+ Run `yarn maps:test` to perform the unit tests via [Karma](https://karma-runner.github.io).
110
+ You can set a seed for running the tests in a specific using an environment variable: `SEED=71384 yarn maps:test`
111
+
112
+ ## License
113
+
114
+ The following applies for code and documentation of the git repository,
115
+ unless explicitly mentioned.
116
+
117
+ Copyright (c) Siemens 2016 - 2025
118
+
119
+ MIT, see [LICENSE.md](LICENSE.md).
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright (c) Siemens 2016 - 2025
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ export * from './components/si-map/index';
6
+ export * from '@siemens/maps-ng/translate';
7
+ export * from './public-api.module';
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./components/si-map/si-map.module";
3
+ export declare class SiMapsNgModule {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<SiMapsNgModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SiMapsNgModule, never, never, [typeof i1.SiMapModule]>;
6
+ static ɵinj: i0.ɵɵInjectorDeclaration<SiMapsNgModule>;
7
+ }
8
+ export { SiMapsNgModule as SimplMapsNgModule };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) Siemens 2016 - 2025
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ export * from './si-translatable-keys.interface';
6
+ export * from './si-translatable-overrides.provider';
@@ -0,0 +1,3 @@
1
+ {
2
+ "module": "../fesm2022/siemens-maps-ng-translate.mjs"
3
+ }
@@ -0,0 +1,7 @@
1
+ export interface SiTranslatableKeys {
2
+ 'SI_MAPS.ATTRIBUTIONS_BUTTON'?: string;
3
+ 'SI_MAPS.TOOLTIP_MORE_TEXT'?: string;
4
+ 'SI_MAPS.ZOOM_IN_BUTTON'?: string;
5
+ 'SI_MAPS.ZOOM_OUT_BUTTON'?: string;
6
+ 'SI_MAPS.ZOOM_TO_DEFAULT_BUTTON'?: string;
7
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Copyright (c) Siemens 2016 - 2025
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+ import { Provider } from '@angular/core';
6
+ import { SiTranslatableKeys } from './si-translatable-keys.interface';
7
+ export declare const provideSiMapsTranslatableOverrides: (values: SiTranslatableKeys) => Provider;