@siemens/maps-ng 48.0.0-next.5

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.
package/LICENSE.md ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License
2
+
3
+ Copyright (c) Siemens 2016 - 2025
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the “Software”), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -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,9 @@
1
+ <svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
+ <rect x="2" y="2" width="25" height="25" fill="url(#pattern0)"/>
3
+ <defs>
4
+ <pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
5
+ <use xlink:href="#image0" transform="scale(0.02)"/>
6
+ </pattern>
7
+ <image id="image0" width="50" height="50" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABmJLR0QA/wD/AP+gvaeTAAADJklEQVRoge2az4tVZRyHn9d+TOKULRKVhBQUzIRmFbZo0aJNKP4BBe38A3ThTkFC3LjIQUaahW7bBJEtJAgKKxVFAynDUJSRYVBU0oHx59PinOQ6TPd+3/eee49IDwxc7vmc9/0+9z0/3vOegeeE1GRj6qvAZuBDYAxYDbxeb74NXAZ+A34Avksp3Wmy/75RV6oT6qxxZtVJdW3b9aOOqHvUuxkC87mv7lNH2pJ4Q/2xD4H5/KKuGLbERvVqgxL/ckXdOCyJ5QOS6JRZPmiJV6wOgUHzs4M8Z6xO7GGxN6e28H1EXQlcBJbk/gCF3AfeTildioQXZTS8i+FJALwM7IyGQyOijgLTwGhhUaXMAitSSnd7BaMjsoU8iXvAAWBTvd9o/Xm83hZlCfBxRr476pcZJ+mU+m6XtsbqTJRDTYqcCnY6101insxcsM0TTYpcD3b6RUab48E2Z5oUuRfs9L2MNjcF25yLtBc92Q3mfg/mAM4Hc48joajI7WAuh0b7jjZ2K5jbEMzlZG9GQlGRi8Hcp8EcwCfB3J+RUFQkejxvU8d6herMtib7joqcC+ZGgKPdZOptR6nmUhHOBHO9UZepj4KXS+vL9Xh9iR2t/96vv4teylUfqK9FasyZxp+lWuIZJsdTSh9EgjnT+G8Li+mHb6LBnBFZD/xRVE4ZAmtSSlci4fCIpJQuAGdLqyrgp6gE5B1aAJOZ+X6YyAlnrf1aPSlOAUtz9itgGngrpfQgukPWiNSPnIdzqyrgYI4EFKzGq6uAv6hufoPgb6rRyJqo5p4jpJSmgCO5+2UwnisBhe9H1DepJnNNLw/dBNallEIz3k6yRwQgpXQN2F+ybw92l0j0hbrYZhezL6gvDVWiQ+azBkU2tyJRiyxSTzcg8X1rEh0yY1avz0qZVde17QGAurcPke1t1/8Eq5ei5wskTqovtF3/U1g9DT7MkJhT32m77gVRP88Q2dF2vf+J+qJ6PCBxTC26GQ8NdZV6o4vEjNVrvGcfdav6eAGJh+pHbdeXhbp7AZHwO8FnBjWpX3VIfK02+t9IQ8NqYe6E+qvVY/L/9OIfE3CKlaPsSH4AAAAASUVORK5CYII="/>
8
+ </defs>
9
+ </svg>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg id="Icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="30" height="30">
3
+ <path fill="#00f"
4
+ d="m256,64c-69.37,0-125.8,56.43-125.8,125.8,0,1.44.04,2.95.12,4.62.46,12.87,2.86,25.46,7.1,37.44,24.76,81.02,105.75,183.3,109.19,187.62,2.28,2.86,5.73,4.52,9.39,4.52s7.11-1.67,9.39-4.52c3.44-4.32,84.44-106.59,109.2-187.62,4.25-11.99,6.64-24.57,7.1-37.41.08-1.51.12-3.07.12-4.64,0-69.37-56.44-125.8-125.81-125.8Z" />
5
+ <path fill="#f0f"
6
+ d="m255.99,277.81c-48.59,0-87.99-39.4-87.99-88.01s39.4-87.99,87.99-87.99,88.01,39.41,88.01,87.99-39.39,88.01-88.01,88.01Z" />
7
+ </svg>
@@ -0,0 +1,21 @@
1
+ import { SI_TRANSLATABLE_VALUES } from '@siemens/element-translate-ng/translate';
2
+
3
+ /* eslint-disable */
4
+
5
+ const provideSiMapsTranslatableOverrides = values => ({
6
+ useValue: values,
7
+ multi: true,
8
+ provide: SI_TRANSLATABLE_VALUES
9
+ });
10
+
11
+ /**
12
+ * Copyright (c) Siemens 2016 - 2025
13
+ * SPDX-License-Identifier: MIT
14
+ */
15
+
16
+ /**
17
+ * Generated bundle index. Do not edit.
18
+ */
19
+
20
+ export { provideSiMapsTranslatableOverrides };
21
+ //# sourceMappingURL=siemens-maps-ng-translate.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"siemens-maps-ng-translate.mjs","sources":["../../../../projects/maps-ng/translate/si-translatable-keys.interface.ts","../../../../projects/maps-ng/translate/si-translatable-overrides.provider.ts","../../../../projects/maps-ng/translate/index.ts","../../../../projects/maps-ng/translate/siemens-maps-ng-translate.ts"],"sourcesContent":["/* eslint-disable */\n\n// Auto-generated file. Run 'npm run build:all:update-translatable-keys' to update.\n\nexport interface SiTranslatableKeys {\n 'SI_MAPS.ATTRIBUTIONS_BUTTON'?: string;\n 'SI_MAPS.TOOLTIP_MORE_TEXT'?: string;\n 'SI_MAPS.ZOOM_IN_BUTTON'?: string;\n 'SI_MAPS.ZOOM_OUT_BUTTON'?: string;\n 'SI_MAPS.ZOOM_TO_DEFAULT_BUTTON'?: string;\n}\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nimport { Provider } from '@angular/core';\nimport { SI_TRANSLATABLE_VALUES } from '@siemens/element-translate-ng/translate';\n\nimport { SiTranslatableKeys } from './si-translatable-keys.interface';\n\nexport const provideSiMapsTranslatableOverrides: (\n values: SiTranslatableKeys\n) => Provider = values => ({\n useValue: values,\n multi: true,\n provide: SI_TRANSLATABLE_VALUES\n});\n","/**\n * Copyright (c) Siemens 2016 - 2025\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-translatable-keys.interface';\nexport * from './si-translatable-overrides.provider';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;;MCSa,kCAAkC,GAE/B,MAAM,KAAK;AACzB,IAAA,QAAQ,EAAE,MAAM;AAChB,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,OAAO,EAAE;AACV,CAAA;;ACfD;;;AAGG;;ACHH;;AAEG;;;;"}