@provoly/dashboard 0.21.4 → 0.21.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/assets/svgs/layers.svg +3 -2
- package/assets/svgs/legend.svg +14 -3
- package/dataset/style/_o-pry-dataset.scss +6 -9
- package/esm2022/dataset/components/dataset.component.mjs +3 -3
- package/esm2022/dataset/style/css.component.mjs +2 -2
- package/esm2022/lib/core/model/manifest.interface.mjs +1 -1
- package/esm2022/lib/core/store/field/field.interface.mjs +2 -1
- package/esm2022/lib/core/store/search/search.reducer.mjs +2 -2
- package/esm2022/lib/dashboard/components/widgets/widget-instanciator/widget-instanciator.component.mjs +12 -3
- package/esm2022/lib/dashboard/dashboard.module.mjs +5 -4
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +1 -1
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +3 -2
- package/esm2022/lib/dashboard/store/manifest.service.mjs +4 -3
- package/esm2022/notification/components/notification/content/notification-content.component.mjs +12 -8
- package/esm2022/notification/components/notification/notification.component.mjs +2 -1
- package/esm2022/notification/style/css.component.mjs +2 -2
- package/esm2022/presentation/components/add-edit-presentation/add-edit-presentation.component.mjs +3 -3
- package/esm2022/presentation/components/presentation.component.mjs +11 -9
- package/esm2022/presentation/style/css.component.mjs +2 -2
- package/esm2022/restitution/components/restitution/restitution.component.mjs +5 -5
- package/esm2022/restitution/components/restitution-catalog/restitution-catalog.component.mjs +3 -3
- package/esm2022/restitution/style/css.component.mjs +2 -2
- package/esm2022/toolbox/components/save-view/save-view.component.mjs +12 -6
- package/esm2022/toolbox/components/share/share.component.mjs +8 -5
- package/esm2022/widgets/widget-chart/component/widget-chart.component.mjs +2 -2
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +57 -17
- package/esm2022/widgets/widget-map/i18n/en.translations.mjs +5 -2
- package/esm2022/widgets/widget-map/i18n/fr.translations.mjs +5 -2
- package/esm2022/widgets/widget-map/interaction/interaction-manager.class.mjs +3 -2
- package/esm2022/widgets/widget-map/style/css.component.mjs +2 -2
- package/esm2022/widgets/widget-map/utils/cql-utils.class.mjs +12 -4
- package/esm2022/widgets/widget-map/utils/widget-map.utils.mjs +3 -2
- package/fesm2022/provoly-dashboard-dataset.mjs +4 -4
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-notification.mjs +14 -9
- package/fesm2022/provoly-dashboard-notification.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +14 -12
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +8 -8
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +17 -8
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-chart.mjs +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +80 -27
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +22 -10
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/model/manifest.interface.d.ts +3 -1
- package/lib/core/store/field/field.interface.d.ts +1 -0
- package/lib/dashboard/components/widgets/widget-instanciator/widget-instanciator.component.d.ts +1 -0
- package/lib/dashboard/store/dashboard.actions.d.ts +3 -0
- package/lib/dashboard/store/manifest.service.d.ts +2 -1
- package/notification/components/notification/content/notification-content.component.d.ts +4 -2
- package/notification/style/_m-notifications.scss +6 -7
- package/package.json +24 -24
- package/presentation/components/presentation.component.d.ts +3 -1
- package/presentation/style/_o-pry-presentation.scss +0 -16
- package/restitution/components/restitution/restitution.component.d.ts +1 -1
- package/restitution/style/_o-restitution.scss +12 -42
- package/styles/components/_a-page-loader.scss +1 -1
- package/styles/components/_o-pry-stepper.scss +9 -10
- package/styles/components/_o-widget.scss +7 -3
- package/styles/layout/_o-manifest-layout.scss +20 -0
- package/styles-theme/components-theme/_o-widget.theme.scss +1 -1
- package/toolbox/components/save-view/save-view.component.d.ts +3 -2
- package/toolbox/components/share/share.component.d.ts +2 -1
- package/widgets/widget-chart/component/widget-chart.component.d.ts +1 -1
- package/widgets/widget-map/component/widget-map.component.d.ts +5 -1
- package/widgets/widget-map/i18n/en.translations.d.ts +3 -0
- package/widgets/widget-map/i18n/fr.translations.d.ts +3 -0
- package/widgets/widget-map/style/_o-layer-legend.scss +43 -54
- package/widgets/widget-map/utils/cql-utils.class.d.ts +2 -2
- package/widgets/widget-map/utils/widget-map.utils.d.ts +2 -0
|
@@ -6,23 +6,23 @@ import { Injectable, Component, ViewEncapsulation, Pipe, ViewContainerRef, Templ
|
|
|
6
6
|
import * as i5 from '@angular/forms';
|
|
7
7
|
import { FormsModule } from '@angular/forms';
|
|
8
8
|
import * as i2 from '@provoly/dashboard';
|
|
9
|
-
import { widgetMapConfig, DashboardActions, ContextMenuActions, TooltipMode, DEFAULT_PROJECTION, ItemUtils, FieldType, ClassSelectors, FieldSelectors, DataWidgetComponent, WIDGET_HEADER_HEIGHT, NamedQueryTypes, DashboardSelectors, ConfigSelectors, DatasourceUtils, GeoMetadata, GeometricFieldTypes, Operation, DataSourceSelectors, ResultsetUtils, PRY_GEOAUTH_TOKEN, BaseWidgetModule, PryCoreModule, PryDashboardModule, PrySelectModule, PryIconModule, PryToggleModule, PryOverlayModule, PryI18nModule, PryRangeModule } from '@provoly/dashboard';
|
|
9
|
+
import { widgetMapConfig, DashboardActions, ContextMenuActions, TooltipMode, TextFieldTypes, DEFAULT_PROJECTION, ItemUtils, FieldType, ClassSelectors, FieldSelectors, DataWidgetComponent, WIDGET_HEADER_HEIGHT, NamedQueryTypes, DashboardSelectors, ConfigSelectors, DatasourceUtils, GeoMetadata, GeometricFieldTypes, Operation, DataSourceSelectors, ResultsetUtils, PRY_GEOAUTH_TOKEN, BaseWidgetModule, PryCoreModule, PryDashboardModule, PrySelectModule, PryIconModule, PryToggleModule, PryOverlayModule, PryI18nModule, PryRangeModule } from '@provoly/dashboard';
|
|
10
10
|
import * as i6 from '@provoly/dashboard/components/checkbox';
|
|
11
11
|
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
12
12
|
import equal from 'fast-deep-equal/es6';
|
|
13
13
|
import { Feature, Overlay, Map, View } from 'ol';
|
|
14
14
|
import { getWidth, getTopLeft, createEmpty, boundingExtent } from 'ol/extent';
|
|
15
15
|
import { Heatmap, Tile } from 'ol/layer';
|
|
16
|
+
import VectorLayer from 'ol/layer/Vector';
|
|
16
17
|
import { toLonLat, get, transform, fromLonLat } from 'ol/proj';
|
|
17
18
|
import { register } from 'ol/proj/proj4';
|
|
18
19
|
import { Vector, TileWMS, ImageWMS, WMTS, XYZ, Cluster, DataTile } from 'ol/source';
|
|
19
20
|
import proj4 from 'proj4';
|
|
20
|
-
import { BehaviorSubject, map, combineLatest, filter, distinctUntilChanged, startWith, debounceTime, delay, mergeMap, of, from, switchMap, catchError } from 'rxjs';
|
|
21
|
+
import { BehaviorSubject, map, combineLatest, filter, distinctUntilChanged, startWith, debounceTime, delay, mergeMap, of, from, switchMap, catchError, withLatestFrom } from 'rxjs';
|
|
21
22
|
import { ScaleLine, Attribution, defaults } from 'ol/control';
|
|
22
23
|
import { Polygon, Circle as Circle$1, LineString } from 'ol/geom';
|
|
23
24
|
import PointerInteraction from 'ol/interaction/Pointer';
|
|
24
25
|
import TileLayer from 'ol/layer/Tile';
|
|
25
|
-
import VectorLayer from 'ol/layer/Vector';
|
|
26
26
|
import VectorTileLayer from 'ol/layer/VectorTile';
|
|
27
27
|
import RenderBox from 'ol/render/Box';
|
|
28
28
|
import VectorSource from 'ol/source/Vector';
|
|
@@ -273,7 +273,8 @@ class InteractionManager {
|
|
|
273
273
|
bar: true,
|
|
274
274
|
steps: 4,
|
|
275
275
|
text: true,
|
|
276
|
-
minWidth: 140
|
|
276
|
+
minWidth: 140,
|
|
277
|
+
dpi: 90
|
|
277
278
|
});
|
|
278
279
|
this.component.map.addControl(this.scaleControl);
|
|
279
280
|
}
|
|
@@ -298,7 +299,7 @@ class InteractionManager {
|
|
|
298
299
|
}
|
|
299
300
|
|
|
300
301
|
class CqlUtils {
|
|
301
|
-
static getCQLParamsFor(datasourceId, filters, classes) {
|
|
302
|
+
static getCQLParamsFor(datasourceId, filters, classes, fields) {
|
|
302
303
|
if (!filters || !datasourceId || !filters[datasourceId] || filters[datasourceId].length === 0) {
|
|
303
304
|
return null;
|
|
304
305
|
}
|
|
@@ -306,12 +307,19 @@ class CqlUtils {
|
|
|
306
307
|
return filters[datasourceId]
|
|
307
308
|
.map((cond) => {
|
|
308
309
|
const conditions = [];
|
|
309
|
-
const
|
|
310
|
+
const attribute = attributesReference.find((attr) => attr.id === cond.attribute);
|
|
311
|
+
const field = fields.find((f) => f.id === attribute?.field);
|
|
312
|
+
const attributeName = attribute?.technicalName;
|
|
310
313
|
if (attributeName && cond.value && (typeof cond.value !== 'string' || cond.value.length > 0)) {
|
|
311
314
|
const quoteSafeValue = `${cond.value}`.replace(/'/g, "''");
|
|
312
315
|
switch (cond.operator) {
|
|
313
316
|
case 'EQUALS':
|
|
314
|
-
|
|
317
|
+
if (!field || TextFieldTypes.includes(field?.type)) {
|
|
318
|
+
conditions.push(`${attributeName}='${quoteSafeValue}'`);
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
conditions.push(`${attributeName}=${cond.value}`);
|
|
322
|
+
}
|
|
315
323
|
break;
|
|
316
324
|
case 'CONTAINS':
|
|
317
325
|
conditions.push(`${attributeName} LIKE '%${quoteSafeValue}%'`);
|
|
@@ -826,6 +834,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
826
834
|
}] });
|
|
827
835
|
|
|
828
836
|
class WidgetMapUtils {
|
|
837
|
+
static { this.geoJSON = new GeoJSON(); }
|
|
829
838
|
static populateLocationAttribute(layer, resultSet, classesNotFiltered, fields) {
|
|
830
839
|
if (['heatmap', 'marker', 'bubble', 'point', 'line', 'polygon', 'multi-line', 'multi-polygon', 'auto'].includes(layer.type) &&
|
|
831
840
|
!!resultSet &&
|
|
@@ -1065,7 +1074,7 @@ class WidgetMapUtils {
|
|
|
1065
1074
|
}
|
|
1066
1075
|
let geometry;
|
|
1067
1076
|
try {
|
|
1068
|
-
geometry =
|
|
1077
|
+
geometry = WidgetMapUtils.geoJSON.readGeometry(value.value, {
|
|
1069
1078
|
featureProjection: projection
|
|
1070
1079
|
});
|
|
1071
1080
|
}
|
|
@@ -1180,11 +1189,11 @@ class LayerSlider {
|
|
|
1180
1189
|
|
|
1181
1190
|
class PryWidgetMapCssComponent {
|
|
1182
1191
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PryWidgetMapCssComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1183
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PryWidgetMapCssComponent, selector: "pry-widget-map-css", ngImport: i0, template: '', isInline: true, styles: [":root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;user-select:text}.ol-grabbing{cursor:grabbing}.ol-grab{cursor:move;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:\" \"}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.o-widget--map{display:flex;flex-direction:column}.o-widget--map div.ol-scale-bar{position:absolute;left:initial;right:8px;bottom:8px}.o-map-wrapper{display:flex;width:100%;flex:1 1}.o-map{width:100%;height:100%}#map,.map-frame{height:100%}.layer-switcher{top:5rem;left:.5rem;right:unset;border-width:.0625rem;border-style:solid;border-radius:.4375rem}.layer-switcher button{background-size:30px;background-position:unset;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIj48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTIwLjA4MyAxNS4ybDEuMjAyLjcyMWEuNS41IDAgMCAxIDAgLjg1OGwtOC43NyA1LjI2MmExIDEgMCAwIDEtMS4wMyAwbC04Ljc3LTUuMjYyYS41LjUgMCAwIDEgMC0uODU4bDEuMjAyLS43MjFMMTIgMjAuMDVsOC4wODMtNC44NXptMC00LjdsMS4yMDIuNzIxYS41LjUgMCAwIDEgMCAuODU4TDEyIDE3LjY1bC05LjI4NS01LjU3MWEuNS41IDAgMCAxIDAtLjg1OGwxLjIwMi0uNzIxTDEyIDE1LjM1bDguMDgzLTQuODV6bS03LjU2OS05LjE5MWw4Ljc3MSA1LjI2MmEuNS41IDAgMCAxIDAgLjg1OEwxMiAxMyAyLjcxNSA3LjQyOWEuNS41IDAgMCAxIDAtLjg1OGw4Ljc3LTUuMjYyYTEgMSAwIDAgMSAxLjAzIDB6TTEyIDMuMzMyTDUuODg3IDcgMTIgMTAuNjY4IDE4LjExMyA3IDEyIDMuMzMyeiIvPjwvc3ZnPg==)}.layer-switcher.shown.ol-control:hover{background-color:#fff9}.ol-attribution,.ol-zoom{top:.3125rem;bottom:unset;border-radius:.375rem;padding:0;border:none;background:white}.ol-attribution>button,.ol-zoom>button{padding:0;border:none;background:white}.ol-zoom{top:.3125rem;right:.5rem;left:unset;bottom:unset;border-radius:.375rem;padding:0;border:none;background:white}.ol-zoom>button{padding:0;border:none;background:white}.a-form-field[type=radio]:read-only{pointer-events:auto}.a-tooltip--move[data-tooltip]:not([data-tooltip-position]):after{left:calc(50% + 20px)}.a-tooltip--click[data-tooltip]:not([data-tooltip-position]):after{left:calc(50% + 10px)}.a-tooltip[data-tooltip].--absolute{position:absolute}.a-tooltip[data-tooltip].--nopos{position:unset}.o-map-slider{position:absolute;width:100%;margin-top:-.625rem;z-index:1;-webkit-appearance:none;appearance:none;background:transparent;cursor:grab}.o-map-slider.-hidden{visibility:hidden;pointer-events:none}.o-map-slider::-webkit-slider-runnable-track{background:none}.o-map-slider::-moz-range-track{background:none}.o-map-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:#113b6e;height:125rem;margin-top:-121.875rem;width:.25rem}.o-map-slider::-moz-range-thumb{border:none;border-radius:0;background-color:#113b6e;height:125rem;margin-top:-121.875rem;width:.25rem}\n", ".m-layer-
|
|
1192
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PryWidgetMapCssComponent, selector: "pry-widget-map-css", ngImport: i0, template: '', isInline: true, styles: [":root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;user-select:text}.ol-grabbing{cursor:grabbing}.ol-grab{cursor:move;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:\" \"}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.o-widget--map{display:flex;flex-direction:column}.o-widget--map div.ol-scale-bar{position:absolute;left:initial;right:8px;bottom:8px}.o-map-wrapper{display:flex;width:100%;flex:1 1}.o-map{width:100%;height:100%}#map,.map-frame{height:100%}.layer-switcher{top:5rem;left:.5rem;right:unset;border-width:.0625rem;border-style:solid;border-radius:.4375rem}.layer-switcher button{background-size:30px;background-position:unset;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIj48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTIwLjA4MyAxNS4ybDEuMjAyLjcyMWEuNS41IDAgMCAxIDAgLjg1OGwtOC43NyA1LjI2MmExIDEgMCAwIDEtMS4wMyAwbC04Ljc3LTUuMjYyYS41LjUgMCAwIDEgMC0uODU4bDEuMjAyLS43MjFMMTIgMjAuMDVsOC4wODMtNC44NXptMC00LjdsMS4yMDIuNzIxYS41LjUgMCAwIDEgMCAuODU4TDEyIDE3LjY1bC05LjI4NS01LjU3MWEuNS41IDAgMCAxIDAtLjg1OGwxLjIwMi0uNzIxTDEyIDE1LjM1bDguMDgzLTQuODV6bS03LjU2OS05LjE5MWw4Ljc3MSA1LjI2MmEuNS41IDAgMCAxIDAgLjg1OEwxMiAxMyAyLjcxNSA3LjQyOWEuNS41IDAgMCAxIDAtLjg1OGw4Ljc3LTUuMjYyYTEgMSAwIDAgMSAxLjAzIDB6TTEyIDMuMzMyTDUuODg3IDcgMTIgMTAuNjY4IDE4LjExMyA3IDEyIDMuMzMyeiIvPjwvc3ZnPg==)}.layer-switcher.shown.ol-control:hover{background-color:#fff9}.ol-attribution,.ol-zoom{top:.3125rem;bottom:unset;border-radius:.375rem;padding:0;border:none;background:white}.ol-attribution>button,.ol-zoom>button{padding:0;border:none;background:white}.ol-zoom{top:.3125rem;right:.5rem;left:unset;bottom:unset;border-radius:.375rem;padding:0;border:none;background:white}.ol-zoom>button{padding:0;border:none;background:white}.a-form-field[type=radio]:read-only{pointer-events:auto}.a-tooltip--move[data-tooltip]:not([data-tooltip-position]):after{left:calc(50% + 20px)}.a-tooltip--click[data-tooltip]:not([data-tooltip-position]):after{left:calc(50% + 10px)}.a-tooltip[data-tooltip].--absolute{position:absolute}.a-tooltip[data-tooltip].--nopos{position:unset}.o-map-slider{position:absolute;width:100%;margin-top:-.625rem;z-index:1;-webkit-appearance:none;appearance:none;background:transparent;cursor:grab}.o-map-slider.-hidden{visibility:hidden;pointer-events:none}.o-map-slider::-webkit-slider-runnable-track{background:none}.o-map-slider::-moz-range-track{background:none}.o-map-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:#113b6e;height:125rem;margin-top:-121.875rem;width:.25rem}.o-map-slider::-moz-range-thumb{border:none;border-radius:0;background-color:#113b6e;height:125rem;margin-top:-121.875rem;width:.25rem}\n", ".m-map-layer-action{display:flex;gap:.375rem;z-index:2;right:.5rem}.m-map-layer-action.ol-control{border:none;background-color:transparent}.m-map-layer-action .-hidden{display:none}.m-map-layer-action__toggle{order:2;width:1.875rem;height:1.875rem}.m-map-layer-action button{background-color:#fafafa!important;color:#113b6e}.m-map-layer-action__title{display:flex;flex-direction:row;align-items:center;font-size:12px}.m-map-layer-action__title:hover{cursor:pointer;background-color:#fafafa!important}.m-map-layer-action__container{color:#113b6e;background-color:#fff;border-radius:.125rem;padding:.3125rem .5rem}.m-map-layer-action__container .a-h4{font-size:12px}.m-map-layer-action__container button.m-map-layer-action__toggle{border-radius:50%}.m-map-layer-action__container button.m-map-layer-action__toggle:hover{outline:none}.m-map-layer-action__image{background:white;overflow:scroll}.m-map-layer-action__error{font-style:italic;color:#c74646}.m-layer-legend__title{align-items:flex-start;gap:.3125rem}.m-layer-legend__dropdown-icon{margin-top:.125rem}.m-layer-switcher__title{align-items:flex-start}.m-map-slide-legend{pointer-events:none;position:absolute;z-index:1;background-color:#fff;border-radius:.3125rem;padding:.3125rem}.m-map-slide-legend.-left{left:4.0625rem}.m-map-slide-legend.-right{right:2.9375rem}.m-map-slide-legend__title{font-weight:700}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1184
1193
|
}
|
|
1185
1194
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PryWidgetMapCssComponent, decorators: [{
|
|
1186
1195
|
type: Component,
|
|
1187
|
-
args: [{ selector: 'pry-widget-map-css', template: '', encapsulation: ViewEncapsulation.None, styles: [":root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;user-select:text}.ol-grabbing{cursor:grabbing}.ol-grab{cursor:move;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:\" \"}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.o-widget--map{display:flex;flex-direction:column}.o-widget--map div.ol-scale-bar{position:absolute;left:initial;right:8px;bottom:8px}.o-map-wrapper{display:flex;width:100%;flex:1 1}.o-map{width:100%;height:100%}#map,.map-frame{height:100%}.layer-switcher{top:5rem;left:.5rem;right:unset;border-width:.0625rem;border-style:solid;border-radius:.4375rem}.layer-switcher button{background-size:30px;background-position:unset;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIj48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTIwLjA4MyAxNS4ybDEuMjAyLjcyMWEuNS41IDAgMCAxIDAgLjg1OGwtOC43NyA1LjI2MmExIDEgMCAwIDEtMS4wMyAwbC04Ljc3LTUuMjYyYS41LjUgMCAwIDEgMC0uODU4bDEuMjAyLS43MjFMMTIgMjAuMDVsOC4wODMtNC44NXptMC00LjdsMS4yMDIuNzIxYS41LjUgMCAwIDEgMCAuODU4TDEyIDE3LjY1bC05LjI4NS01LjU3MWEuNS41IDAgMCAxIDAtLjg1OGwxLjIwMi0uNzIxTDEyIDE1LjM1bDguMDgzLTQuODV6bS03LjU2OS05LjE5MWw4Ljc3MSA1LjI2MmEuNS41IDAgMCAxIDAgLjg1OEwxMiAxMyAyLjcxNSA3LjQyOWEuNS41IDAgMCAxIDAtLjg1OGw4Ljc3LTUuMjYyYTEgMSAwIDAgMSAxLjAzIDB6TTEyIDMuMzMyTDUuODg3IDcgMTIgMTAuNjY4IDE4LjExMyA3IDEyIDMuMzMyeiIvPjwvc3ZnPg==)}.layer-switcher.shown.ol-control:hover{background-color:#fff9}.ol-attribution,.ol-zoom{top:.3125rem;bottom:unset;border-radius:.375rem;padding:0;border:none;background:white}.ol-attribution>button,.ol-zoom>button{padding:0;border:none;background:white}.ol-zoom{top:.3125rem;right:.5rem;left:unset;bottom:unset;border-radius:.375rem;padding:0;border:none;background:white}.ol-zoom>button{padding:0;border:none;background:white}.a-form-field[type=radio]:read-only{pointer-events:auto}.a-tooltip--move[data-tooltip]:not([data-tooltip-position]):after{left:calc(50% + 20px)}.a-tooltip--click[data-tooltip]:not([data-tooltip-position]):after{left:calc(50% + 10px)}.a-tooltip[data-tooltip].--absolute{position:absolute}.a-tooltip[data-tooltip].--nopos{position:unset}.o-map-slider{position:absolute;width:100%;margin-top:-.625rem;z-index:1;-webkit-appearance:none;appearance:none;background:transparent;cursor:grab}.o-map-slider.-hidden{visibility:hidden;pointer-events:none}.o-map-slider::-webkit-slider-runnable-track{background:none}.o-map-slider::-moz-range-track{background:none}.o-map-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:#113b6e;height:125rem;margin-top:-121.875rem;width:.25rem}.o-map-slider::-moz-range-thumb{border:none;border-radius:0;background-color:#113b6e;height:125rem;margin-top:-121.875rem;width:.25rem}\n", ".m-layer-
|
|
1196
|
+
args: [{ selector: 'pry-widget-map-css', template: '', encapsulation: ViewEncapsulation.None, styles: [":root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;user-select:text}.ol-grabbing{cursor:grabbing}.ol-grab{cursor:move;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:\" \"}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}.o-widget--map{display:flex;flex-direction:column}.o-widget--map div.ol-scale-bar{position:absolute;left:initial;right:8px;bottom:8px}.o-map-wrapper{display:flex;width:100%;flex:1 1}.o-map{width:100%;height:100%}#map,.map-frame{height:100%}.layer-switcher{top:5rem;left:.5rem;right:unset;border-width:.0625rem;border-style:solid;border-radius:.4375rem}.layer-switcher button{background-size:30px;background-position:unset;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIj48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTIwLjA4MyAxNS4ybDEuMjAyLjcyMWEuNS41IDAgMCAxIDAgLjg1OGwtOC43NyA1LjI2MmExIDEgMCAwIDEtMS4wMyAwbC04Ljc3LTUuMjYyYS41LjUgMCAwIDEgMC0uODU4bDEuMjAyLS43MjFMMTIgMjAuMDVsOC4wODMtNC44NXptMC00LjdsMS4yMDIuNzIxYS41LjUgMCAwIDEgMCAuODU4TDEyIDE3LjY1bC05LjI4NS01LjU3MWEuNS41IDAgMCAxIDAtLjg1OGwxLjIwMi0uNzIxTDEyIDE1LjM1bDguMDgzLTQuODV6bS03LjU2OS05LjE5MWw4Ljc3MSA1LjI2MmEuNS41IDAgMCAxIDAgLjg1OEwxMiAxMyAyLjcxNSA3LjQyOWEuNS41IDAgMCAxIDAtLjg1OGw4Ljc3LTUuMjYyYTEgMSAwIDAgMSAxLjAzIDB6TTEyIDMuMzMyTDUuODg3IDcgMTIgMTAuNjY4IDE4LjExMyA3IDEyIDMuMzMyeiIvPjwvc3ZnPg==)}.layer-switcher.shown.ol-control:hover{background-color:#fff9}.ol-attribution,.ol-zoom{top:.3125rem;bottom:unset;border-radius:.375rem;padding:0;border:none;background:white}.ol-attribution>button,.ol-zoom>button{padding:0;border:none;background:white}.ol-zoom{top:.3125rem;right:.5rem;left:unset;bottom:unset;border-radius:.375rem;padding:0;border:none;background:white}.ol-zoom>button{padding:0;border:none;background:white}.a-form-field[type=radio]:read-only{pointer-events:auto}.a-tooltip--move[data-tooltip]:not([data-tooltip-position]):after{left:calc(50% + 20px)}.a-tooltip--click[data-tooltip]:not([data-tooltip-position]):after{left:calc(50% + 10px)}.a-tooltip[data-tooltip].--absolute{position:absolute}.a-tooltip[data-tooltip].--nopos{position:unset}.o-map-slider{position:absolute;width:100%;margin-top:-.625rem;z-index:1;-webkit-appearance:none;appearance:none;background:transparent;cursor:grab}.o-map-slider.-hidden{visibility:hidden;pointer-events:none}.o-map-slider::-webkit-slider-runnable-track{background:none}.o-map-slider::-moz-range-track{background:none}.o-map-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:#113b6e;height:125rem;margin-top:-121.875rem;width:.25rem}.o-map-slider::-moz-range-thumb{border:none;border-radius:0;background-color:#113b6e;height:125rem;margin-top:-121.875rem;width:.25rem}\n", ".m-map-layer-action{display:flex;gap:.375rem;z-index:2;right:.5rem}.m-map-layer-action.ol-control{border:none;background-color:transparent}.m-map-layer-action .-hidden{display:none}.m-map-layer-action__toggle{order:2;width:1.875rem;height:1.875rem}.m-map-layer-action button{background-color:#fafafa!important;color:#113b6e}.m-map-layer-action__title{display:flex;flex-direction:row;align-items:center;font-size:12px}.m-map-layer-action__title:hover{cursor:pointer;background-color:#fafafa!important}.m-map-layer-action__container{color:#113b6e;background-color:#fff;border-radius:.125rem;padding:.3125rem .5rem}.m-map-layer-action__container .a-h4{font-size:12px}.m-map-layer-action__container button.m-map-layer-action__toggle{border-radius:50%}.m-map-layer-action__container button.m-map-layer-action__toggle:hover{outline:none}.m-map-layer-action__image{background:white;overflow:scroll}.m-map-layer-action__error{font-style:italic;color:#c74646}.m-layer-legend__title{align-items:flex-start;gap:.3125rem}.m-layer-legend__dropdown-icon{margin-top:.125rem}.m-layer-switcher__title{align-items:flex-start}.m-map-slide-legend{pointer-events:none;position:absolute;z-index:1;background-color:#fff;border-radius:.3125rem;padding:.3125rem}.m-map-slide-legend.-left{left:4.0625rem}.m-map-slide-legend.-right{right:2.9375rem}.m-map-slide-legend__title{font-weight:700}\n"] }]
|
|
1188
1197
|
}] });
|
|
1189
1198
|
|
|
1190
1199
|
class GeometryFieldsForPipe {
|
|
@@ -1320,6 +1329,7 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
1320
1329
|
this.attributions = new Attribution();
|
|
1321
1330
|
this.actionMenuOpen$ = new BehaviorSubject(false);
|
|
1322
1331
|
this.olZoomElement$ = new BehaviorSubject(null);
|
|
1332
|
+
this.previousLayers = [];
|
|
1323
1333
|
this.getOlZoomElement();
|
|
1324
1334
|
this.slides = [
|
|
1325
1335
|
{ id: 'all', label: this.translateService.instant('@pry.widget.map.slide.all') },
|
|
@@ -1540,7 +1550,7 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
1540
1550
|
}));
|
|
1541
1551
|
this.height$ = combineLatest([this.widgetSize$.pipe(debounceTime(100)), this.displayHeader$]).pipe(map(([size, display]) => (size.height ?? 100) - (display ? WIDGET_HEADER_HEIGHT : 0)), delay(10));
|
|
1542
1552
|
this.attributions$ = this.options$.pipe(map((options) => !!options.attributions));
|
|
1543
|
-
this.legendTop$ = combineLatest([this.displayHeader$, this.attributions$]).pipe(map(([header, attr]) => 5 + (header ?
|
|
1553
|
+
this.legendTop$ = combineLatest([this.displayHeader$, this.attributions$]).pipe(map(([header, attr]) => 5 + (header ? WIDGET_HEADER_HEIGHT : 0) + (attr ? 41 : 0)));
|
|
1544
1554
|
this.legendHeight$ = combineLatest([this.widgetSize$.pipe(debounceTime(100)), this.legendTop$]).pipe(map(([size, top]) => {
|
|
1545
1555
|
return (size.height ?? 100) - WIDGET_HEADER_HEIGHT - top - 56; // 56px is the tooltip height + margin
|
|
1546
1556
|
}), delay(10));
|
|
@@ -1551,7 +1561,7 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
1551
1561
|
.reduce((p, c) => ({ ...p, [c.url]: c }), {})
|
|
1552
1562
|
: {}), startWith({}))
|
|
1553
1563
|
.subscribe((possibleStyles) => (this.possibleStyles = possibleStyles)));
|
|
1554
|
-
this.hasSlideLayer$ = this.options$.pipe(map((options) => (options.layers ?? []).map((layer) => !!layer.slide).reduce((a, b) => a || b, false)));
|
|
1564
|
+
this.hasSlideLayer$ = this.options$.pipe(map((options) => (options.layers ?? []).map((layer) => !!layer.slide && layer.slide !== 'all').reduce((a, b) => a || b, false)));
|
|
1555
1565
|
}
|
|
1556
1566
|
initInteractionManager() {
|
|
1557
1567
|
return this.interactionManager.init(this);
|
|
@@ -1584,15 +1594,15 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
1584
1594
|
}) */
|
|
1585
1595
|
];
|
|
1586
1596
|
}));
|
|
1587
|
-
this.options$
|
|
1597
|
+
this.subscriptions.add(this.options$
|
|
1588
1598
|
.pipe(map((options) => ({
|
|
1589
1599
|
center: fromLonLat(options.center ?? WidgetMapUtils.DEFAULT_MAP_CENTER),
|
|
1590
1600
|
maxZoom: options.zoom?.max ?? WidgetMapUtils.DEFAULT_ZOOM_MAX,
|
|
1591
1601
|
minZoom: options.zoom?.min ?? WidgetMapUtils.DEFAULT_ZOOM_MIN,
|
|
1592
1602
|
zoom: options.zoom?.start ?? WidgetMapUtils.DEFAULT_ZOOM_START
|
|
1593
1603
|
})), distinctUntilChanged())
|
|
1594
|
-
.subscribe((view) => this.map.setView(new View(view)));
|
|
1595
|
-
this.options$
|
|
1604
|
+
.subscribe((view) => this.map.setView(new View(view))));
|
|
1605
|
+
this.subscriptions.add(this.options$
|
|
1596
1606
|
.pipe(map((options) => options.attributions), distinctUntilChanged())
|
|
1597
1607
|
.subscribe((attributions) => {
|
|
1598
1608
|
if (!attributions) {
|
|
@@ -1601,15 +1611,16 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
1601
1611
|
else {
|
|
1602
1612
|
this.map.addControl(this.attributions);
|
|
1603
1613
|
}
|
|
1604
|
-
});
|
|
1614
|
+
}));
|
|
1605
1615
|
this.layers$ = combineLatest([
|
|
1606
1616
|
this.resultSet$,
|
|
1607
1617
|
this.options$,
|
|
1608
1618
|
this.classes$,
|
|
1609
1619
|
this.additionalLayers$,
|
|
1610
1620
|
this.itemStyles$,
|
|
1611
|
-
this.datasourceFilters
|
|
1612
|
-
|
|
1621
|
+
this.datasourceFilters$,
|
|
1622
|
+
this.fields$
|
|
1623
|
+
]).pipe(filter(([resultSet, options, classes, additionalLayers, itemStyles, filters, fields]) => !!resultSet && !!options && !!classes && !!fields), map(([resultSet, options, classes, additionalLayers, itemStyles, filters, fields]) => {
|
|
1613
1624
|
let hasRelationLayer = null;
|
|
1614
1625
|
const layers = (options?.layers || [])
|
|
1615
1626
|
.filter(
|
|
@@ -1656,7 +1667,7 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
1656
1667
|
}
|
|
1657
1668
|
resultLayer.set('title', layer.title);
|
|
1658
1669
|
if (layer.type === 'geoserver') {
|
|
1659
|
-
const cql_filter = CqlUtils.getCQLParamsFor(layer.datasourceId, filters, classes);
|
|
1670
|
+
const cql_filter = CqlUtils.getCQLParamsFor(layer.datasourceId, filters, classes, fields);
|
|
1660
1671
|
if (cql_filter) {
|
|
1661
1672
|
// Adding CQL query to geoserver layers
|
|
1662
1673
|
resultLayer.getSource().updateParams({ cql_filter });
|
|
@@ -1699,6 +1710,7 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
1699
1710
|
/* Resolve bug drawing webgllayer without nothing underneath: add empty layer below */
|
|
1700
1711
|
const _layers = this.addEmptyWebGlLayerBelowSlideHeatmaps(layers);
|
|
1701
1712
|
_layers.forEach((layer, index, arr) => layer.set('zIndex', arr.length - index));
|
|
1713
|
+
this.previousLayers.push(..._layers);
|
|
1702
1714
|
return _layers;
|
|
1703
1715
|
}));
|
|
1704
1716
|
this.fitExtents$ = combineLatest([
|
|
@@ -1734,10 +1746,14 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
1734
1746
|
])
|
|
1735
1747
|
: of([])), startWith([]));
|
|
1736
1748
|
this.legendLayers$ = this.options$.pipe(map((options) => (options.layers ?? []).filter((layer) => ['geoserver', 'wms'].includes(layer.type))), delay(10));
|
|
1737
|
-
this.layersTop$ = combineLatest([this.legendTop$, this.legendLayers$]).pipe(map(([legendTop, layers]) => legendTop + ((layers.length ?? 0) > 0 ?
|
|
1738
|
-
this.subscriptions.add(combineLatest([this.layersTop$, this.olZoomElement$])
|
|
1749
|
+
this.layersTop$ = combineLatest([this.legendTop$, this.legendLayers$]).pipe(map(([legendTop, layers]) => legendTop + ((layers.length ?? 0) > 0 ? 35 : 0)));
|
|
1750
|
+
this.subscriptions.add(combineLatest([this.layersTop$, this.legendLayers$, this.olZoomElement$, this.displayHeader$])
|
|
1751
|
+
.pipe(withLatestFrom(this.layers$))
|
|
1752
|
+
.subscribe(([[layersTop, legend, zoomElement, displayHeader], layers]) => {
|
|
1739
1753
|
if (zoomElement) {
|
|
1740
|
-
zoomElement.style.top = `${layersTop +
|
|
1754
|
+
zoomElement.style.top = `${layersTop +
|
|
1755
|
+
((legend.length ?? 0) > 0 || layers.length > 0 ? 5 : 0) +
|
|
1756
|
+
(!displayHeader ? WIDGET_HEADER_HEIGHT : 0)}px`;
|
|
1741
1757
|
}
|
|
1742
1758
|
}));
|
|
1743
1759
|
this.subscriptions.add(combineLatest([
|
|
@@ -1869,8 +1885,12 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
1869
1885
|
generateTooltip(value) {
|
|
1870
1886
|
return new Promise((resolve) => {
|
|
1871
1887
|
const component$ = this.tooltipFactoryService.generateTooltip(value.oClass, this.injector, this.popupContent);
|
|
1872
|
-
|
|
1888
|
+
this.previousTooltipSub?.unsubscribe();
|
|
1889
|
+
this.previousTooltipSub = component$.subscribe((component) => {
|
|
1873
1890
|
if (component) {
|
|
1891
|
+
if (this.previousTooltip) {
|
|
1892
|
+
this.previousTooltip.destroy();
|
|
1893
|
+
}
|
|
1874
1894
|
component.instance.data.item = value;
|
|
1875
1895
|
component.instance.popup = this.popup;
|
|
1876
1896
|
resolve(component);
|
|
@@ -2206,6 +2226,16 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
2206
2226
|
ngOnDestroy() {
|
|
2207
2227
|
super.ngOnDestroy();
|
|
2208
2228
|
this.store.dispatch(DashboardActions.resetWmsFeatures());
|
|
2229
|
+
// Trying to release objects
|
|
2230
|
+
this.clearLayers(this.map.getLayers().getArray());
|
|
2231
|
+
this.clearLayers(this.previousLayers);
|
|
2232
|
+
this.map.getRenderer().dispose();
|
|
2233
|
+
// @ts-ignore
|
|
2234
|
+
delete this.map;
|
|
2235
|
+
// @ts-ignore
|
|
2236
|
+
this.map = null;
|
|
2237
|
+
this.previousTooltipSub?.unsubscribe();
|
|
2238
|
+
this.previousTooltip?.destroy();
|
|
2209
2239
|
}
|
|
2210
2240
|
getStyle(_layer) {
|
|
2211
2241
|
const layer = _layer;
|
|
@@ -2244,6 +2274,9 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
2244
2274
|
}
|
|
2245
2275
|
changeSlideOption($event) {
|
|
2246
2276
|
this.optionsCopy.slide = $event;
|
|
2277
|
+
if ($event === false) {
|
|
2278
|
+
this.optionsCopy.layers?.forEach((layer) => (layer.slide = 'all'));
|
|
2279
|
+
}
|
|
2247
2280
|
}
|
|
2248
2281
|
toggleMenu() {
|
|
2249
2282
|
this.actionMenuOpen$.next(!this.actionMenuOpen$.getValue());
|
|
@@ -2274,12 +2307,26 @@ class WidgetMapComponent extends DataWidgetComponent {
|
|
|
2274
2307
|
this.interactionManager.selectionInteraction.changeSelection(action);
|
|
2275
2308
|
this.toggleMenu();
|
|
2276
2309
|
}
|
|
2310
|
+
clearLayers(layers) {
|
|
2311
|
+
layers.forEach((layer) => {
|
|
2312
|
+
this.map.removeLayer(layer);
|
|
2313
|
+
if (layer instanceof VectorLayer && layer.getSource()) {
|
|
2314
|
+
layer.getSource().clear();
|
|
2315
|
+
layer.setSource(undefined);
|
|
2316
|
+
}
|
|
2317
|
+
if (layer instanceof TileLayer && layer.getSource()) {
|
|
2318
|
+
layer.getSource().clear();
|
|
2319
|
+
layer.setSource(undefined);
|
|
2320
|
+
}
|
|
2321
|
+
layer.dispose();
|
|
2322
|
+
});
|
|
2323
|
+
}
|
|
2277
2324
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetMapComponent, deps: [{ token: i1.Store }, { token: i2.PryI18nService }, { token: i2.TooltipFactoryService }, { token: i2.SymbolService }, { token: i0.Injector }, { token: WidgetMapLayerService }, { token: i2.PryAggregationService }, { token: i0.ElementRef }, { token: PRY_GEOAUTH_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2278
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: WidgetMapComponent, selector: "pry-widget-map", viewQueries: [{ propertyName: "mapRef", first: true, predicate: ["mapRef"], descendants: true }, { propertyName: "popup", first: true, predicate: ["popup"], descendants: true }, { propertyName: "popupContent", first: true, predicate: ["popupContent"], descendants: true, read: ViewContainerRef }, { propertyName: "exportTypeTemplate", first: true, predicate: ["exportTypeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "sliderElement", first: true, predicate: ["sliderElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<pry-widget-map-css></pry-widget-map-css>\n<div class=\"o-widget o-widget--map\">\n <pry-widget-header\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n #header\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_style\">{{ '@pry.widget.map.style' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeStyle($event)\"\n [items]=\"styles$ | async\"\n [ngModel]=\"optionsCopy.style\"\n bindLabel=\"label\"\n bindValue=\"identifier\"\n id=\"map_style\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.style === STYLE_FROM_URL\">\n <label class=\"a-label\" for=\"style_URL\">{{ '@pry.widget.map.styleUrl' | i18n }}</label>\n <input\n id=\"style_URL\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeStyleURL($event)\"\n [value]=\"optionsCopy.styleURL ?? ''\"\n />\n </div>\n\n <pry-checkbox (ngModelChange)=\"changeSingleLayer($event)\" [ngModel]=\"optionsCopy.singleLayer ?? false\">\n {{ '@pry.widget.map.singleLayer' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeAutoLayer($event)\" [ngModel]=\"optionsCopy.automaticLayers ?? false\">\n {{ '@pry.widget.map.autoLayer' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeAttributions($event)\" [ngModel]=\"optionsCopy.attributions ?? false\">\n {{ '@pry.widget.map.attributions' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeSlideOption($event)\" [ngModel]=\"optionsCopy.slide ?? false\">\n {{ '@pry.widget.map.slide.global' | i18n }}\n </pry-checkbox>\n\n <div class=\"o-settings__popup__content__actions -has-separator\">\n <button type=\"button\" (click)=\"addLayer()\" class=\"a-btn a-btn--icon-text -link-like\">\n <pry-icon iconSvg=\"library_add\"></pry-icon>\n {{ '@pry.widget.map.addLayer' | i18n }}\n </button>\n </div>\n\n <div *ngFor=\"let layer of optionsCopy?.layers; let i = index\" class=\"o-settings__popup__content__fields\">\n <div class=\"o-settings__popup__content__fields__head\">\n <h3 class=\"a-h3 settings-layer-title__title\">{{ '@pry.widget.map.layer' | i18n : { index: i + 1 } }}</h3>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"invertLayers(i, i - 1)\" *ngIf=\"i > 0\">\n <pry-icon iconSvg=\"fleche_haut\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.moveUp' | i18n }}</span>\n </button>\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n (click)=\"invertLayers(i, i + 1)\"\n *ngIf=\"i < (optionsCopy?.layers?.length ?? 0) - 1\"\n >\n <pry-icon iconSvg=\"fleche_bas\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.moveDown' | i18n }}</span>\n </button>\n </div>\n </div>\n\n <div class=\"o-settings__popup__content__fields__content\">\n <pry-range\n [ngModel]=\"(layer?.opacity ?? 100) + ''\"\n (ngModelChange)=\"changeOpacity(layer, $event)\"\n labelTranslate=\"@pry.widget.map.opacity\"\n min=\"0\"\n max=\"100\"\n ></pry-range>\n\n <fieldset>\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.layerOptions' | i18n : { index: i + 1 } }}</legend>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_layerTitle\">{{ '@pry.widget.map.layerTitle' | i18n }}</label>\n <input\n id=\"map_layerTitle\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeTitle($event, layer)\"\n [value]=\"layer.title ?? ''\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"!['geoserver', 'auto'].includes(layer.type)\">\n <label class=\"a-label\" for=\"map_layerType\">{{ '@pry.widget.map.layerType.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeLayerType($event, i)\"\n [items]=\"layerTypes\"\n [ngModel]=\"layer.type\"\n i18nPrefix=\"@pry.widget.map.layerType.\"\n id=\"map_layerType\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"['geoserver', 'wms'].includes(layer.type)\">\n <ng-container *ngIf=\"getAsWmsType(layer) as wmslayer\">\n <label class=\"a-label\" for=\"map_layerStyle\">{{ '@pry.widget.map.layerStyle' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeLayerStyle($event, layer)\"\n [items]=\"layerStyleOptions(layer)\"\n [ngModel]=\"getStyle(layer)\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"map_layerStyle\"\n ></pry-select>\n </ng-container>\n </div>\n\n <pry-checkbox (ngModelChange)=\"changeFit($event, layer)\" [ngModel]=\"layer.fit\">\n {{ '@pry.widget.map.fit' | i18n }}\n </pry-checkbox>\n\n <div\n *ngIf=\"\n layer.type !== 'relation' &&\n layer.type !== 'wms' &&\n layer.type !== 'wmts' &&\n layer.type !== 'geoserver' &&\n layer.type !== 'featurelayer' &&\n layer.type !== 'vectortile' &&\n layer.type !== 'rastertile' &&\n layer.type !== 'auto'\n \"\n class=\"m-form-label-field\"\n >\n <label class=\"a-label\" for=\"map_classes\">{{ '@pry.widget.map.classes' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeClasses($event, layer)\"\n [items]=\"usedClasses$ | async\"\n [multiple]=\"true\"\n [ngModel]=\"layer.classes\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"map_classes\"\n ></pry-select>\n </div>\n </fieldset>\n </div>\n\n <fieldset\n *ngIf=\"\n layer.type !== 'relation' &&\n layer.type !== 'wms' &&\n layer.type !== 'wmts' &&\n layer.type !== 'geoserver' &&\n layer.type !== 'featurelayer' &&\n layer.type !== 'vectortile' &&\n layer.type !== 'rastertile'\n \"\n >\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.locationAttr' | i18n }}</legend>\n <ng-container\n *ngIf=\"\n layer\n | geometryFieldsFor : { resultSet: resultSet$, classes: layer.classes, type: layer.type }\n | async as fields\n \"\n >\n <div\n *ngIf=\"\n ['heatmap', 'bubble', 'marker', 'point', 'line', 'polygon', 'multi-line', 'multi-polygon'].indexOf(\n layer.type\n ) >= 0\n \"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_locationAttribute_both\">{{\n '@pry.widget.map.locationAttribute.both' | i18n\n }}</label>\n <pry-select\n (ngModelChange)=\"changeLocationAttributes($event, layer)\"\n [items]=\"fields\"\n [ngModel]=\"layer.attribute\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"map_locationAttribute_both\"\n ></pry-select>\n </div>\n </div>\n\n <div *ngIf=\"['heatmap', 'bubble'].indexOf(layer.type) >= 0\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_intensityAttribute\">{{\n '@pry.widget.map.intensityAttribute' | i18n\n }}</label>\n <pry-select\n (ngModelChange)=\"changeIntensityAttributes($event, layer)\"\n [items]=\"fields\"\n [ngModel]=\"layerHasIntensity(layer).intensityAttribute\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"map_intensityAttribute\"\n ></pry-select>\n </div>\n </div>\n </ng-container>\n </fieldset>\n\n <fieldset\n *ngIf=\"\n layer.type === 'wms' ||\n layer.type === 'geoserver' ||\n layer.type === 'wmts' ||\n layer.type === 'featurelayer' ||\n layer.type === 'vectortile' ||\n layer.type === 'rastertile'\n \"\n >\n <ng-container *ngIf=\"layer.type !== 'geoserver'\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_wms_url\">{{ '@pry.widget.map.wms.url' | i18n }}</label>\n <input\n id=\"map_wms_url\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeUrl($event, layer)\"\n [value]=\"layer.url\"\n />\n </div>\n </ng-container>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wms' || layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_paramLayer\">{{ '@pry.widget.map.wms.paramLayer' | i18n }}</label>\n <input\n id=\"map_wms_paramLayer\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeParamLayer($event, layer)\"\n [value]=\"layer.paramLayer\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_matrixSet\">{{ '@pry.widget.map.wms.matrixSet' | i18n }}</label>\n <input\n id=\"map_wms_matrixSet\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeMatrixSet($event, layer)\"\n [value]=\"layer.matrixSet\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_style\">{{ '@pry.widget.map.wms.style' | i18n }}</label>\n <input\n id=\"map_wms_style\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeParamStyle($event, layer)\"\n [value]=\"layer.style\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wms' || layer.type === 'geoserver'\">\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.tile' | i18n }}</legend>\n <pry-checkbox (ngModelChange)=\"changeParamTiled($event, layer)\" [ngModel]=\"layer?.paramTiled ?? false\">\n {{ '@pry.widget.map.wms.paramTiled' | i18n }}\n </pry-checkbox>\n </div>\n </fieldset>\n\n <fieldset *ngIf=\"layer.type === 'marker'\">\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.clustering' | i18n }}</legend>\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"changeClustered(layer, $event)\" [ngModel]=\"layer.clustered\">\n {{ '@pry.widget.map.clustered' | i18n }}\n </pry-checkbox>\n </div>\n <div *ngIf=\"layer.clustered\">\n <pry-range\n [ngModel]=\"layer.clustered\"\n (ngModelChange)=\"changeClusterDistance(layer, $event)\"\n labelTranslate=\"@pry.widget.map.clusterDistance\"\n min=\"1\"\n max=\"500\"\n ></pry-range>\n </div>\n </fieldset>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.slide ?? false\">\n <label class=\"a-label\" for=\"slide_select\">{{ '@pry.widget.map.slide.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeSlide($event, layer)\"\n [items]=\"slides\"\n [ngModel]=\"layer.slide ?? 'all'\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"slide_select\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.attributions\">\n <label class=\"a-label\" for=\"attribution\">{{ '@pry.widget.map.attribution' | i18n }}</label>\n <input\n id=\"attribution\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeAttribution($event, layer)\"\n [value]=\"layer.attribution ? layer.attribution : ''\"\n />\n </div>\n\n <button\n type=\"button\"\n (click)=\"deleteLayer(i, layer)\"\n class=\"a-btn a-btn--icon-text -link-like\"\n *ngIf=\"layer.type !== 'geoserver'\"\n data-func=\"delete\"\n >\n <pry-icon iconSvg=\"delete\" [width]=\"19\" [height]=\"19\"></pry-icon>\n <span>{{ '@pry.widget.map.deleteLayer' | i18n }}</span>\n </button>\n </div>\n </pry-settings>\n </pry-widget-header>\n\n <div\n class=\"m-btn-group -map-selection-choice -vertical\"\n [class.-with-header]=\"displayHeader$ | async\"\n [class.-closed]=\"!(actionMenuOpen$ | async)\"\n >\n <div class=\"-vertical\">\n <ng-container *ngFor=\"let action of basicActions$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip a-tooltip--{{ action }}\"\n (click)=\"changeSelection(action)\"\n [class.-selected]=\"(interactionManager.selectionInteraction.selectionType$ | async) === action\"\n [attr.data-tooltip]=\"'@pry.widget.map.' + action | i18n\"\n data-tooltip-position=\"right\"\n >\n <pry-icon [iconSvg]=\"action\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.' + action | i18n }}</span>\n </button>\n </ng-container>\n </div>\n\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip -map-toggle\"\n id=\"open_menu\"\n [attr.aria-expanded]=\"actionMenuOpen$ | async\"\n aria-controls=\"export_type\"\n aria-haspopup=\"menu\"\n (click)=\"toggleMenu()\"\n >\n <pry-icon\n [iconSvg]=\"(actionMenuOpen$ | async) ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"12\"\n [height]=\"24\"\n ></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.open' | i18n }}</span>\n </button>\n </div>\n\n <div class=\"m-btn-group -map-selection-choice -map-export\" [class.-with-header]=\"displayHeader$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip\"\n id=\"export_card\"\n aria-expanded=\"false\"\n aria-controls=\"export_type\"\n aria-haspopup=\"menu\"\n [attr.data-tooltip]=\"'@pry.widget.map.export' | i18n\"\n data-tooltip-position=\"right\"\n (click)=\"export()\"\n >\n <pry-icon iconSvg=\"file_download\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.export' | i18n }}</span>\n </button>\n </div>\n\n <div\n class=\"ol-control m-layer-switcher\"\n *ngIf=\"((layers$ | async)?.length ?? 0) > 0\"\n [style.top.px]=\"layersTop$ | async\"\n >\n <button\n class=\"m-layer-switcher__toggle a-tooltip\"\n (click)=\"toggleLayersWindow()\"\n [attr.data-tooltip]=\"'@pry.widget.map.selectLayers' | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon iconSvg=\"layers\" [width]=\"22\" [height]=\"22\"></pry-icon>\n </button>\n <ng-container *ngFor=\"let layer of mapLayers; let index = index\">\n <div class=\"m-layer-switcher__title\" [class.-hidden]=\"!layersTabOpen\">\n {{ layer.get('title') }}\n <ng-container *ngIf=\"!(options$ | async)?.singleLayer; else singleLayer\">\n <pry-checkbox [ngModel]=\"layer.getVisible()\" (change)=\"changeVisibility(layer)\"></pry-checkbox>\n </ng-container>\n <ng-template #singleLayer>\n <input\n type=\"radio\"\n name=\"layer\"\n [id]=\"'radio-layer-' + layer.get('title').split(' ')[0]\"\n [ngModel]=\"layerVisibleIdx\"\n [value]=\"index\"\n (change)=\"changeVisibility(layer)\"\n />\n </ng-template>\n </div>\n </ng-container>\n </div>\n\n <div\n class=\"ol-control m-layer-legend\"\n *ngIf=\"((legendLayers$ | async)?.length ?? 0) > 0\"\n [style.top.px]=\"legendTop$ | async\"\n >\n <button\n class=\"m-layer-legend__toggle a-tooltip\"\n (click)=\"toggleLegendWindow()\"\n [attr.data-tooltip]=\"'@pry.widget.map.legends' | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon iconSvg=\"legend\" [width]=\"22\" [height]=\"22\"></pry-icon>\n </button>\n <ng-container *ngFor=\"let geoLayer of legendLayers$ | async; let index = index\">\n <div class=\"m-layer-legend__title\" [class.-hidden]=\"!legendTabOpen\">\n {{ geoLayer.title }}\n <ng-container *ngIf=\"isLayerRendered(geoLayer)\">\n <button class=\"m-layer-legend__toggle\" (click)=\"toggleLegend(index)\">\n <pry-icon\n [iconSvg]=\"legendTab === index ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"22\"\n [height]=\"22\"\n ></pry-icon>\n </button>\n </ng-container>\n <ng-container *ngIf=\"!isLayerRendered(geoLayer)\">\n <pry-icon [iconSvg]=\"'close'\" [width]=\"22\" [height]=\"22\"></pry-icon>\n </ng-container>\n </div>\n <div\n class=\"m-layer-legend__image\"\n [class.-hidden]=\"!legendTabOpen || legendTab !== index || !isLayerRendered(geoLayer)\"\n [style.max-height.px]=\"legendHeight$ | async\"\n >\n <ng-container *ngIf=\"geoLayer | legendUrl : { capabilities: (wmsCapabilities$ | async) } as url\">\n <img\n [src]=\"url | getSecuredImage | async\"\n [alt]=\"'@pry.widget.map.legend' | i18n : { layer: geoLayer.title }\"\n (error)=\"imageNotProvided[index] = true\"\n />\n </ng-container>\n <ng-container *ngIf=\"!(geoLayer | legendUrl : { capabilities: (wmsCapabilities$ | async) })\">\n <p class=\"m-layer-legend__error\">{{ '@pry.widget.map.legendNotProvided' | i18n }}</p>\n </ng-container>\n </div>\n </ng-container>\n </div>\n\n <div class=\"m-map-slide-legend -left\" *ngIf=\"leftSlideLayers.length > 0\" [style.top.px]=\"legendTop$ | async\">\n <span class=\"m-map-slide-legend__title\">{{ '@pry.widget.map.slideTitle' | i18n }}:</span>\n <div *ngFor=\"let layer of leftSlideLayers\">\n {{ layer.get('title') }}\n </div>\n </div>\n\n <div class=\"m-map-slide-legend -right\" *ngIf=\"rightSlideLayers.length > 0\" [style.top.px]=\"legendTop$ | async\">\n <span class=\"m-map-slide-legend__title\">{{ '@pry.widget.map.slideTitle' | i18n }}:</span>\n <div *ngFor=\"let layer of rightSlideLayers\">\n {{ layer.get('title') }}\n </div>\n </div>\n\n <div [style.height.px]=\"height$ | async\" class=\"o-map-wrapper\">\n <div class=\"o-map\">\n <div #mapRef id=\"map\"></div>\n <input\n type=\"range\"\n min=\"0\"\n max=\"100\"\n step=\"0.01\"\n value=\"50\"\n #sliderElement\n class=\"o-map-slider\"\n [class.-hidden]=\"!(hasSlideLayer$ | async)\"\n (input)=\"triggerLayerRender()\"\n />\n </div>\n </div>\n\n <div #popup class=\"m-tooltip m-tooltip--popup\" [hidden]=\"true\" role=\"tooltip\">\n <div class=\"m-tooltip--popup__header\">\n <p>{{ this.tooltipIndex + 1 }} / {{ this.tooltipNumber }}</p>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"tooltipMove(-1)\" [disabled]=\"!tooltipCanMove(-1)\">\n <pry-icon iconSvg=\"arrow_back\"></pry-icon>\n </button>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"tooltipMove(1)\" [disabled]=\"!tooltipCanMove(1)\">\n <pry-icon iconSvg=\"arrow_right\"></pry-icon>\n </button>\n </div>\n <div class=\"m-tooltip--popup__container\">\n <ng-container #popupContent></ng-container>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.SettingsComponent, selector: "pry-settings", inputs: ["widgetIndex", "isDisable", "headerPresent", "open$", "header"], outputs: ["triggerClick", "saveTriggered", "changeTitle"] }, { kind: "component", type: i2.PryWidgetHeaderComponent, selector: "pry-widget-header", inputs: ["manifest", "openData$", "additionalOptions", "headerOptions", "displayCount", "datasourceIds", "widgetIndex"], outputs: ["manifestModified"] }, { kind: "component", type: i2.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "loading", "elementRef"], outputs: ["searched", "cleared"] }, { kind: "component", type: i2.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i6.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "component", type: i2.PryRangeComponent, selector: "pry-range", inputs: ["min", "max", "step", "disabled", "labelTranslate"] }, { kind: "component", type: PryWidgetMapCssComponent, selector: "pry-widget-map-css" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.GetSecuredImagePipe, name: "getSecuredImage" }, { kind: "pipe", type: i2.I18nPipe, name: "i18n" }, { kind: "pipe", type: GeometryFieldsForPipe, name: "geometryFieldsFor" }, { kind: "pipe", type: WidgetMapLegendUrlPipe, name: "legendUrl" }] }); }
|
|
2325
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: WidgetMapComponent, selector: "pry-widget-map", viewQueries: [{ propertyName: "mapRef", first: true, predicate: ["mapRef"], descendants: true }, { propertyName: "popup", first: true, predicate: ["popup"], descendants: true }, { propertyName: "popupContent", first: true, predicate: ["popupContent"], descendants: true, read: ViewContainerRef }, { propertyName: "exportTypeTemplate", first: true, predicate: ["exportTypeTemplate"], descendants: true, read: TemplateRef }, { propertyName: "sliderElement", first: true, predicate: ["sliderElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<pry-widget-map-css></pry-widget-map-css>\n<div class=\"o-widget o-widget--map\">\n <pry-widget-header\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n #header\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_style\">{{ '@pry.widget.map.style' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeStyle($event)\"\n [items]=\"styles$ | async\"\n [ngModel]=\"optionsCopy.style\"\n bindLabel=\"label\"\n bindValue=\"identifier\"\n id=\"map_style\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.style === STYLE_FROM_URL\">\n <label class=\"a-label\" for=\"style_URL\">{{ '@pry.widget.map.styleUrl' | i18n }}</label>\n <input\n id=\"style_URL\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeStyleURL($event)\"\n [value]=\"optionsCopy.styleURL ?? ''\"\n />\n </div>\n\n <pry-checkbox (ngModelChange)=\"changeSingleLayer($event)\" [ngModel]=\"optionsCopy.singleLayer ?? false\">\n {{ '@pry.widget.map.singleLayer' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeAutoLayer($event)\" [ngModel]=\"optionsCopy.automaticLayers ?? false\">\n {{ '@pry.widget.map.autoLayer' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeAttributions($event)\" [ngModel]=\"optionsCopy.attributions ?? false\">\n {{ '@pry.widget.map.attributions' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeSlideOption($event)\" [ngModel]=\"hasSlideLayer$ | async\">\n {{ '@pry.widget.map.slide.global' | i18n }}\n </pry-checkbox>\n\n <div class=\"o-settings__popup__content__actions -has-separator\">\n <button type=\"button\" (click)=\"addLayer()\" class=\"a-btn a-btn--icon-text -link-like\">\n <pry-icon iconSvg=\"library_add\"></pry-icon>\n {{ '@pry.widget.map.addLayer' | i18n }}\n </button>\n </div>\n\n <div *ngFor=\"let layer of optionsCopy?.layers; let i = index\" class=\"o-settings__popup__content__fields\">\n <div class=\"o-settings__popup__content__fields__head\">\n <h3 class=\"a-h3 settings-layer-title__title\">{{ '@pry.widget.map.layer' | i18n : { index: i + 1 } }}</h3>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"invertLayers(i, i - 1)\" *ngIf=\"i > 0\">\n <pry-icon iconSvg=\"fleche_haut\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.moveUp' | i18n }}</span>\n </button>\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n (click)=\"invertLayers(i, i + 1)\"\n *ngIf=\"i < (optionsCopy?.layers?.length ?? 0) - 1\"\n >\n <pry-icon iconSvg=\"fleche_bas\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.moveDown' | i18n }}</span>\n </button>\n </div>\n </div>\n\n <div class=\"o-settings__popup__content__fields__content\">\n <pry-range\n [ngModel]=\"(layer?.opacity ?? 100) + ''\"\n (ngModelChange)=\"changeOpacity(layer, $event)\"\n labelTranslate=\"@pry.widget.map.opacity\"\n min=\"0\"\n max=\"100\"\n ></pry-range>\n\n <fieldset>\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.layerOptions' | i18n : { index: i + 1 } }}</legend>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_layerTitle\">{{ '@pry.widget.map.layerTitle' | i18n }}</label>\n <input\n id=\"map_layerTitle\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeTitle($event, layer)\"\n [value]=\"layer.title ?? ''\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"!['geoserver', 'auto'].includes(layer.type)\">\n <label class=\"a-label\" for=\"map_layerType\">{{ '@pry.widget.map.layerType.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeLayerType($event, i)\"\n [items]=\"layerTypes\"\n [ngModel]=\"layer.type\"\n i18nPrefix=\"@pry.widget.map.layerType.\"\n id=\"map_layerType\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"['geoserver', 'wms'].includes(layer.type)\">\n <ng-container *ngIf=\"getAsWmsType(layer) as wmslayer\">\n <label class=\"a-label\" for=\"map_layerStyle\">{{ '@pry.widget.map.layerStyle' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeLayerStyle($event, layer)\"\n [items]=\"layerStyleOptions(layer)\"\n [ngModel]=\"getStyle(layer)\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"map_layerStyle\"\n ></pry-select>\n </ng-container>\n </div>\n\n <pry-checkbox (ngModelChange)=\"changeFit($event, layer)\" [ngModel]=\"layer.fit\">\n {{ '@pry.widget.map.fit' | i18n }}\n </pry-checkbox>\n\n <div\n *ngIf=\"\n layer.type !== 'relation' &&\n layer.type !== 'wms' &&\n layer.type !== 'wmts' &&\n layer.type !== 'geoserver' &&\n layer.type !== 'featurelayer' &&\n layer.type !== 'vectortile' &&\n layer.type !== 'rastertile' &&\n layer.type !== 'auto'\n \"\n class=\"m-form-label-field\"\n >\n <label class=\"a-label\" for=\"map_classes\">{{ '@pry.widget.map.classes' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeClasses($event, layer)\"\n [items]=\"usedClasses$ | async\"\n [multiple]=\"true\"\n [ngModel]=\"layer.classes\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"map_classes\"\n ></pry-select>\n </div>\n </fieldset>\n </div>\n\n <fieldset\n *ngIf=\"\n layer.type !== 'relation' &&\n layer.type !== 'wms' &&\n layer.type !== 'wmts' &&\n layer.type !== 'geoserver' &&\n layer.type !== 'featurelayer' &&\n layer.type !== 'vectortile' &&\n layer.type !== 'rastertile'\n \"\n >\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.locationAttr' | i18n }}</legend>\n <ng-container\n *ngIf=\"\n layer\n | geometryFieldsFor : { resultSet: resultSet$, classes: layer.classes, type: layer.type }\n | async as fields\n \"\n >\n <div\n *ngIf=\"\n ['heatmap', 'bubble', 'marker', 'point', 'line', 'polygon', 'multi-line', 'multi-polygon'].indexOf(\n layer.type\n ) >= 0\n \"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_locationAttribute_both\">{{\n '@pry.widget.map.locationAttribute.both' | i18n\n }}</label>\n <pry-select\n (ngModelChange)=\"changeLocationAttributes($event, layer)\"\n [items]=\"fields\"\n [ngModel]=\"layer.attribute\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"map_locationAttribute_both\"\n ></pry-select>\n </div>\n </div>\n\n <div *ngIf=\"['heatmap', 'bubble'].indexOf(layer.type) >= 0\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_intensityAttribute\">{{\n '@pry.widget.map.intensityAttribute' | i18n\n }}</label>\n <pry-select\n (ngModelChange)=\"changeIntensityAttributes($event, layer)\"\n [items]=\"fields\"\n [ngModel]=\"layerHasIntensity(layer).intensityAttribute\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"map_intensityAttribute\"\n ></pry-select>\n </div>\n </div>\n </ng-container>\n </fieldset>\n\n <fieldset\n *ngIf=\"\n layer.type === 'wms' ||\n layer.type === 'geoserver' ||\n layer.type === 'wmts' ||\n layer.type === 'featurelayer' ||\n layer.type === 'vectortile' ||\n layer.type === 'rastertile'\n \"\n >\n <ng-container *ngIf=\"layer.type !== 'geoserver'\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_wms_url\">{{ '@pry.widget.map.wms.url' | i18n }}</label>\n <input\n id=\"map_wms_url\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeUrl($event, layer)\"\n [value]=\"layer.url\"\n />\n </div>\n </ng-container>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wms' || layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_paramLayer\">{{ '@pry.widget.map.wms.paramLayer' | i18n }}</label>\n <input\n id=\"map_wms_paramLayer\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeParamLayer($event, layer)\"\n [value]=\"layer.paramLayer\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_matrixSet\">{{ '@pry.widget.map.wms.matrixSet' | i18n }}</label>\n <input\n id=\"map_wms_matrixSet\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeMatrixSet($event, layer)\"\n [value]=\"layer.matrixSet\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_style\">{{ '@pry.widget.map.wms.style' | i18n }}</label>\n <input\n id=\"map_wms_style\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeParamStyle($event, layer)\"\n [value]=\"layer.style\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wms' || layer.type === 'geoserver'\">\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.tile' | i18n }}</legend>\n <pry-checkbox (ngModelChange)=\"changeParamTiled($event, layer)\" [ngModel]=\"layer?.paramTiled ?? false\">\n {{ '@pry.widget.map.wms.paramTiled' | i18n }}\n </pry-checkbox>\n </div>\n </fieldset>\n\n <fieldset *ngIf=\"layer.type === 'marker'\">\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.clustering' | i18n }}</legend>\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"changeClustered(layer, $event)\" [ngModel]=\"layer.clustered\">\n {{ '@pry.widget.map.clustered' | i18n }}\n </pry-checkbox>\n </div>\n <div *ngIf=\"layer.clustered\">\n <pry-range\n [ngModel]=\"layer.clustered\"\n (ngModelChange)=\"changeClusterDistance(layer, $event)\"\n labelTranslate=\"@pry.widget.map.clusterDistance\"\n min=\"1\"\n max=\"500\"\n ></pry-range>\n </div>\n </fieldset>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.slide ?? false\">\n <label class=\"a-label\" for=\"slide_select\">{{ '@pry.widget.map.slide.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeSlide($event, layer)\"\n [items]=\"slides\"\n [ngModel]=\"layer.slide ?? 'all'\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"slide_select\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.attributions\">\n <label class=\"a-label\" for=\"attribution\">{{ '@pry.widget.map.attribution' | i18n }}</label>\n <input\n id=\"attribution\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeAttribution($event, layer)\"\n [value]=\"layer.attribution ? layer.attribution : ''\"\n />\n </div>\n\n <button\n type=\"button\"\n (click)=\"deleteLayer(i, layer)\"\n class=\"a-btn a-btn--icon-text -link-like\"\n *ngIf=\"layer.type !== 'geoserver'\"\n data-func=\"delete\"\n >\n <pry-icon iconSvg=\"delete\" [width]=\"19\" [height]=\"19\"></pry-icon>\n <span>{{ '@pry.widget.map.deleteLayer' | i18n }}</span>\n </button>\n </div>\n </pry-settings>\n </pry-widget-header>\n\n <div\n class=\"m-btn-group -map-selection-choice -vertical\"\n [class.-with-header]=\"displayHeader$ | async\"\n [class.-closed]=\"!(actionMenuOpen$ | async)\"\n >\n <div class=\"-vertical\">\n <ng-container *ngFor=\"let action of basicActions$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip a-tooltip--{{ action }}\"\n (click)=\"changeSelection(action)\"\n [class.-selected]=\"(interactionManager.selectionInteraction.selectionType$ | async) === action\"\n [attr.data-tooltip]=\"'@pry.widget.map.' + action | i18n\"\n data-tooltip-position=\"right\"\n >\n <pry-icon [iconSvg]=\"action\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.' + action | i18n }}</span>\n </button>\n </ng-container>\n </div>\n\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip -map-toggle\"\n id=\"open_menu\"\n [attr.aria-expanded]=\"actionMenuOpen$ | async\"\n aria-controls=\"export_type\"\n aria-haspopup=\"menu\"\n (click)=\"toggleMenu()\"\n >\n <pry-icon\n [iconSvg]=\"(actionMenuOpen$ | async) ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"12\"\n [height]=\"24\"\n ></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.open' | i18n }}</span>\n </button>\n </div>\n\n <div class=\"m-btn-group -map-selection-choice -map-export\" [class.-with-header]=\"displayHeader$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip\"\n id=\"export_card\"\n aria-expanded=\"false\"\n aria-controls=\"export_type\"\n aria-haspopup=\"menu\"\n [attr.data-tooltip]=\"'@pry.widget.map.export' | i18n\"\n data-tooltip-position=\"right\"\n (click)=\"export()\"\n >\n <pry-icon iconSvg=\"file_download\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.export' | i18n }}</span>\n </button>\n </div>\n\n <div\n class=\"ol-control m-layer-switcher m-map-layer-action\"\n *ngIf=\"((layers$ | async)?.length ?? 0) > 0\"\n [style.top.px]=\"layersTop$ | async\"\n >\n <button\n class=\"m-map-layer-action__toggle\"\n [class.a-tooltip]=\"!this.layersTabOpen\"\n [class.-tooltip-no-wrap]=\"!this.layersTabOpen\"\n (click)=\"toggleLayersWindow()\"\n [attr.data-tooltip]=\"'@pry.widget.map.selectLayers' | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon iconSvg=\"layers\" [width]=\"18\" [height]=\"18\"></pry-icon>\n </button>\n <div class=\"m-map-layer-action__container\" [class.-hidden]=\"!layersTabOpen\">\n <span class=\"a-h4\">{{ '@pry.widget.map.layersTitle' | i18n }}</span>\n <ng-container *ngFor=\"let layer of mapLayers; let index = index\">\n <div class=\"m-map-layer-action__title m-layer-switcher__title\" [class.-hidden]=\"!layersTabOpen\">\n <pry-checkbox\n *ngIf=\"!(options$ | async)?.singleLayer; else singleLayer\"\n [ngModel]=\"layer.getVisible()\"\n (change)=\"changeVisibility(layer)\"\n ></pry-checkbox>\n <ng-template #singleLayer>\n <input\n type=\"radio\"\n name=\"layer\"\n [id]=\"'radio-layer-' + layer.get('title').split(' ')[0]\"\n [ngModel]=\"layerVisibleIdx\"\n [value]=\"index\"\n (change)=\"changeVisibility(layer)\"\n />\n </ng-template>\n {{ layer.get('title') }}\n </div>\n </ng-container>\n </div>\n </div>\n\n <div\n class=\"ol-control m-map-layer-action m-layer-legend\"\n *ngIf=\"((legendLayers$ | async)?.length ?? 0) > 0\"\n [style.top.px]=\"legendTop$ | async\"\n >\n <button\n class=\"m-map-layer-action__toggle\"\n [class.a-tooltip]=\"!this.legendTabOpen\"\n [class.-tooltip-no-wrap]=\"!this.legendTabOpen\"\n (click)=\"toggleLegendWindow()\"\n [attr.data-tooltip]=\"'@pry.widget.map.legends' | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon iconSvg=\"legend\" [width]=\"18\" [height]=\"15\"></pry-icon>\n </button>\n <div class=\"m-map-layer-action__container\" [class.-hidden]=\"!legendTabOpen\">\n <span class=\"a-h4\">{{ '@pry.widget.map.legendsTitle' | i18n }}</span>\n <ng-container *ngFor=\"let geoLayer of legendLayers$ | async; let index = index\">\n <div class=\"m-map-layer-action__title m-layer-legend__title\" (click)=\"toggleLegend(index)\">\n <pry-icon\n *ngIf=\"isLayerRendered(geoLayer) && !!geoLayer.title\"\n class=\"m-layer-legend__dropdown-icon\"\n [iconSvg]=\"legendTab === index ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"12\"\n [height]=\"12\"\n ></pry-icon>\n {{ geoLayer.title }}\n <pry-icon\n *ngIf=\"!isLayerRendered(geoLayer)\"\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.map.layerLoadError' | i18n\"\n [iconSvg]=\"'close'\"\n [width]=\"22\"\n [height]=\"22\"\n ></pry-icon>\n </div>\n <div\n class=\"m-map-layer-action__image\"\n [class.-hidden]=\"!legendTabOpen || legendTab !== index || !isLayerRendered(geoLayer)\"\n [style.max-height.px]=\"legendHeight$ | async\"\n >\n <ng-container *ngIf=\"geoLayer | legendUrl : { capabilities: (wmsCapabilities$ | async) } as url\">\n <img\n [src]=\"url | getSecuredImage | async\"\n [alt]=\"'@pry.widget.map.legend' | i18n : { layer: geoLayer.title }\"\n (error)=\"imageNotProvided[index] = true\"\n />\n </ng-container>\n <ng-container *ngIf=\"!(geoLayer | legendUrl : { capabilities: (wmsCapabilities$ | async) })\">\n <p class=\"m-map-layer-action__error\">{{ '@pry.widget.map.legendNotProvided' | i18n }}</p>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n\n <div class=\"m-map-slide-legend -left\" *ngIf=\"leftSlideLayers.length > 0\" [style.top.px]=\"legendTop$ | async\">\n <span class=\"m-map-slide-legend__title\">{{ '@pry.widget.map.slideTitle' | i18n }}:</span>\n <div *ngFor=\"let layer of leftSlideLayers\">\n {{ layer.get('title') }}\n </div>\n </div>\n\n <div class=\"m-map-slide-legend -right\" *ngIf=\"rightSlideLayers.length > 0\" [style.top.px]=\"legendTop$ | async\">\n <span class=\"m-map-slide-legend__title\">{{ '@pry.widget.map.slideTitle' | i18n }}:</span>\n <div *ngFor=\"let layer of rightSlideLayers\">\n {{ layer.get('title') }}\n </div>\n </div>\n\n <div [style.height.px]=\"height$ | async\" class=\"o-map-wrapper\">\n <div class=\"o-map\">\n <div #mapRef id=\"map\"></div>\n <input\n type=\"range\"\n min=\"0\"\n max=\"100\"\n step=\"0.01\"\n value=\"50\"\n #sliderElement\n class=\"o-map-slider\"\n [class.-hidden]=\"!(hasSlideLayer$ | async)\"\n (input)=\"triggerLayerRender()\"\n />\n </div>\n </div>\n\n <div #popup class=\"m-tooltip m-tooltip--popup\" [hidden]=\"true\" role=\"tooltip\">\n <div class=\"m-tooltip--popup__header\">\n <p>{{ this.tooltipIndex + 1 }} / {{ this.tooltipNumber }}</p>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"tooltipMove(-1)\" [disabled]=\"!tooltipCanMove(-1)\">\n <pry-icon iconSvg=\"arrow_back\"></pry-icon>\n </button>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"tooltipMove(1)\" [disabled]=\"!tooltipCanMove(1)\">\n <pry-icon iconSvg=\"arrow_right\"></pry-icon>\n </button>\n </div>\n <div class=\"m-tooltip--popup__container\">\n <ng-container #popupContent></ng-container>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.SettingsComponent, selector: "pry-settings", inputs: ["widgetIndex", "isDisable", "headerPresent", "open$", "header"], outputs: ["triggerClick", "saveTriggered", "changeTitle"] }, { kind: "component", type: i2.PryWidgetHeaderComponent, selector: "pry-widget-header", inputs: ["manifest", "openData$", "additionalOptions", "headerOptions", "displayCount", "datasourceIds", "widgetIndex"], outputs: ["manifestModified"] }, { kind: "component", type: i2.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "readonly", "autocomplete", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "loading", "elementRef"], outputs: ["searched", "cleared"] }, { kind: "component", type: i2.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i6.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle"] }, { kind: "component", type: i2.PryRangeComponent, selector: "pry-range", inputs: ["min", "max", "step", "disabled", "labelTranslate"] }, { kind: "component", type: PryWidgetMapCssComponent, selector: "pry-widget-map-css" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.GetSecuredImagePipe, name: "getSecuredImage" }, { kind: "pipe", type: i2.I18nPipe, name: "i18n" }, { kind: "pipe", type: GeometryFieldsForPipe, name: "geometryFieldsFor" }, { kind: "pipe", type: WidgetMapLegendUrlPipe, name: "legendUrl" }] }); }
|
|
2279
2326
|
}
|
|
2280
2327
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetMapComponent, decorators: [{
|
|
2281
2328
|
type: Component,
|
|
2282
|
-
args: [{ selector: 'pry-widget-map', template: "<pry-widget-map-css></pry-widget-map-css>\n<div class=\"o-widget o-widget--map\">\n <pry-widget-header\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n #header\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_style\">{{ '@pry.widget.map.style' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeStyle($event)\"\n [items]=\"styles$ | async\"\n [ngModel]=\"optionsCopy.style\"\n bindLabel=\"label\"\n bindValue=\"identifier\"\n id=\"map_style\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.style === STYLE_FROM_URL\">\n <label class=\"a-label\" for=\"style_URL\">{{ '@pry.widget.map.styleUrl' | i18n }}</label>\n <input\n id=\"style_URL\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeStyleURL($event)\"\n [value]=\"optionsCopy.styleURL ?? ''\"\n />\n </div>\n\n <pry-checkbox (ngModelChange)=\"changeSingleLayer($event)\" [ngModel]=\"optionsCopy.singleLayer ?? false\">\n {{ '@pry.widget.map.singleLayer' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeAutoLayer($event)\" [ngModel]=\"optionsCopy.automaticLayers ?? false\">\n {{ '@pry.widget.map.autoLayer' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeAttributions($event)\" [ngModel]=\"optionsCopy.attributions ?? false\">\n {{ '@pry.widget.map.attributions' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeSlideOption($event)\" [ngModel]=\"optionsCopy.slide ?? false\">\n {{ '@pry.widget.map.slide.global' | i18n }}\n </pry-checkbox>\n\n <div class=\"o-settings__popup__content__actions -has-separator\">\n <button type=\"button\" (click)=\"addLayer()\" class=\"a-btn a-btn--icon-text -link-like\">\n <pry-icon iconSvg=\"library_add\"></pry-icon>\n {{ '@pry.widget.map.addLayer' | i18n }}\n </button>\n </div>\n\n <div *ngFor=\"let layer of optionsCopy?.layers; let i = index\" class=\"o-settings__popup__content__fields\">\n <div class=\"o-settings__popup__content__fields__head\">\n <h3 class=\"a-h3 settings-layer-title__title\">{{ '@pry.widget.map.layer' | i18n : { index: i + 1 } }}</h3>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"invertLayers(i, i - 1)\" *ngIf=\"i > 0\">\n <pry-icon iconSvg=\"fleche_haut\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.moveUp' | i18n }}</span>\n </button>\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n (click)=\"invertLayers(i, i + 1)\"\n *ngIf=\"i < (optionsCopy?.layers?.length ?? 0) - 1\"\n >\n <pry-icon iconSvg=\"fleche_bas\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.moveDown' | i18n }}</span>\n </button>\n </div>\n </div>\n\n <div class=\"o-settings__popup__content__fields__content\">\n <pry-range\n [ngModel]=\"(layer?.opacity ?? 100) + ''\"\n (ngModelChange)=\"changeOpacity(layer, $event)\"\n labelTranslate=\"@pry.widget.map.opacity\"\n min=\"0\"\n max=\"100\"\n ></pry-range>\n\n <fieldset>\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.layerOptions' | i18n : { index: i + 1 } }}</legend>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_layerTitle\">{{ '@pry.widget.map.layerTitle' | i18n }}</label>\n <input\n id=\"map_layerTitle\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeTitle($event, layer)\"\n [value]=\"layer.title ?? ''\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"!['geoserver', 'auto'].includes(layer.type)\">\n <label class=\"a-label\" for=\"map_layerType\">{{ '@pry.widget.map.layerType.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeLayerType($event, i)\"\n [items]=\"layerTypes\"\n [ngModel]=\"layer.type\"\n i18nPrefix=\"@pry.widget.map.layerType.\"\n id=\"map_layerType\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"['geoserver', 'wms'].includes(layer.type)\">\n <ng-container *ngIf=\"getAsWmsType(layer) as wmslayer\">\n <label class=\"a-label\" for=\"map_layerStyle\">{{ '@pry.widget.map.layerStyle' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeLayerStyle($event, layer)\"\n [items]=\"layerStyleOptions(layer)\"\n [ngModel]=\"getStyle(layer)\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"map_layerStyle\"\n ></pry-select>\n </ng-container>\n </div>\n\n <pry-checkbox (ngModelChange)=\"changeFit($event, layer)\" [ngModel]=\"layer.fit\">\n {{ '@pry.widget.map.fit' | i18n }}\n </pry-checkbox>\n\n <div\n *ngIf=\"\n layer.type !== 'relation' &&\n layer.type !== 'wms' &&\n layer.type !== 'wmts' &&\n layer.type !== 'geoserver' &&\n layer.type !== 'featurelayer' &&\n layer.type !== 'vectortile' &&\n layer.type !== 'rastertile' &&\n layer.type !== 'auto'\n \"\n class=\"m-form-label-field\"\n >\n <label class=\"a-label\" for=\"map_classes\">{{ '@pry.widget.map.classes' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeClasses($event, layer)\"\n [items]=\"usedClasses$ | async\"\n [multiple]=\"true\"\n [ngModel]=\"layer.classes\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"map_classes\"\n ></pry-select>\n </div>\n </fieldset>\n </div>\n\n <fieldset\n *ngIf=\"\n layer.type !== 'relation' &&\n layer.type !== 'wms' &&\n layer.type !== 'wmts' &&\n layer.type !== 'geoserver' &&\n layer.type !== 'featurelayer' &&\n layer.type !== 'vectortile' &&\n layer.type !== 'rastertile'\n \"\n >\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.locationAttr' | i18n }}</legend>\n <ng-container\n *ngIf=\"\n layer\n | geometryFieldsFor : { resultSet: resultSet$, classes: layer.classes, type: layer.type }\n | async as fields\n \"\n >\n <div\n *ngIf=\"\n ['heatmap', 'bubble', 'marker', 'point', 'line', 'polygon', 'multi-line', 'multi-polygon'].indexOf(\n layer.type\n ) >= 0\n \"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_locationAttribute_both\">{{\n '@pry.widget.map.locationAttribute.both' | i18n\n }}</label>\n <pry-select\n (ngModelChange)=\"changeLocationAttributes($event, layer)\"\n [items]=\"fields\"\n [ngModel]=\"layer.attribute\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"map_locationAttribute_both\"\n ></pry-select>\n </div>\n </div>\n\n <div *ngIf=\"['heatmap', 'bubble'].indexOf(layer.type) >= 0\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_intensityAttribute\">{{\n '@pry.widget.map.intensityAttribute' | i18n\n }}</label>\n <pry-select\n (ngModelChange)=\"changeIntensityAttributes($event, layer)\"\n [items]=\"fields\"\n [ngModel]=\"layerHasIntensity(layer).intensityAttribute\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"map_intensityAttribute\"\n ></pry-select>\n </div>\n </div>\n </ng-container>\n </fieldset>\n\n <fieldset\n *ngIf=\"\n layer.type === 'wms' ||\n layer.type === 'geoserver' ||\n layer.type === 'wmts' ||\n layer.type === 'featurelayer' ||\n layer.type === 'vectortile' ||\n layer.type === 'rastertile'\n \"\n >\n <ng-container *ngIf=\"layer.type !== 'geoserver'\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_wms_url\">{{ '@pry.widget.map.wms.url' | i18n }}</label>\n <input\n id=\"map_wms_url\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeUrl($event, layer)\"\n [value]=\"layer.url\"\n />\n </div>\n </ng-container>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wms' || layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_paramLayer\">{{ '@pry.widget.map.wms.paramLayer' | i18n }}</label>\n <input\n id=\"map_wms_paramLayer\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeParamLayer($event, layer)\"\n [value]=\"layer.paramLayer\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_matrixSet\">{{ '@pry.widget.map.wms.matrixSet' | i18n }}</label>\n <input\n id=\"map_wms_matrixSet\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeMatrixSet($event, layer)\"\n [value]=\"layer.matrixSet\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_style\">{{ '@pry.widget.map.wms.style' | i18n }}</label>\n <input\n id=\"map_wms_style\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeParamStyle($event, layer)\"\n [value]=\"layer.style\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wms' || layer.type === 'geoserver'\">\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.tile' | i18n }}</legend>\n <pry-checkbox (ngModelChange)=\"changeParamTiled($event, layer)\" [ngModel]=\"layer?.paramTiled ?? false\">\n {{ '@pry.widget.map.wms.paramTiled' | i18n }}\n </pry-checkbox>\n </div>\n </fieldset>\n\n <fieldset *ngIf=\"layer.type === 'marker'\">\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.clustering' | i18n }}</legend>\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"changeClustered(layer, $event)\" [ngModel]=\"layer.clustered\">\n {{ '@pry.widget.map.clustered' | i18n }}\n </pry-checkbox>\n </div>\n <div *ngIf=\"layer.clustered\">\n <pry-range\n [ngModel]=\"layer.clustered\"\n (ngModelChange)=\"changeClusterDistance(layer, $event)\"\n labelTranslate=\"@pry.widget.map.clusterDistance\"\n min=\"1\"\n max=\"500\"\n ></pry-range>\n </div>\n </fieldset>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.slide ?? false\">\n <label class=\"a-label\" for=\"slide_select\">{{ '@pry.widget.map.slide.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeSlide($event, layer)\"\n [items]=\"slides\"\n [ngModel]=\"layer.slide ?? 'all'\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"slide_select\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.attributions\">\n <label class=\"a-label\" for=\"attribution\">{{ '@pry.widget.map.attribution' | i18n }}</label>\n <input\n id=\"attribution\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeAttribution($event, layer)\"\n [value]=\"layer.attribution ? layer.attribution : ''\"\n />\n </div>\n\n <button\n type=\"button\"\n (click)=\"deleteLayer(i, layer)\"\n class=\"a-btn a-btn--icon-text -link-like\"\n *ngIf=\"layer.type !== 'geoserver'\"\n data-func=\"delete\"\n >\n <pry-icon iconSvg=\"delete\" [width]=\"19\" [height]=\"19\"></pry-icon>\n <span>{{ '@pry.widget.map.deleteLayer' | i18n }}</span>\n </button>\n </div>\n </pry-settings>\n </pry-widget-header>\n\n <div\n class=\"m-btn-group -map-selection-choice -vertical\"\n [class.-with-header]=\"displayHeader$ | async\"\n [class.-closed]=\"!(actionMenuOpen$ | async)\"\n >\n <div class=\"-vertical\">\n <ng-container *ngFor=\"let action of basicActions$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip a-tooltip--{{ action }}\"\n (click)=\"changeSelection(action)\"\n [class.-selected]=\"(interactionManager.selectionInteraction.selectionType$ | async) === action\"\n [attr.data-tooltip]=\"'@pry.widget.map.' + action | i18n\"\n data-tooltip-position=\"right\"\n >\n <pry-icon [iconSvg]=\"action\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.' + action | i18n }}</span>\n </button>\n </ng-container>\n </div>\n\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip -map-toggle\"\n id=\"open_menu\"\n [attr.aria-expanded]=\"actionMenuOpen$ | async\"\n aria-controls=\"export_type\"\n aria-haspopup=\"menu\"\n (click)=\"toggleMenu()\"\n >\n <pry-icon\n [iconSvg]=\"(actionMenuOpen$ | async) ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"12\"\n [height]=\"24\"\n ></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.open' | i18n }}</span>\n </button>\n </div>\n\n <div class=\"m-btn-group -map-selection-choice -map-export\" [class.-with-header]=\"displayHeader$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip\"\n id=\"export_card\"\n aria-expanded=\"false\"\n aria-controls=\"export_type\"\n aria-haspopup=\"menu\"\n [attr.data-tooltip]=\"'@pry.widget.map.export' | i18n\"\n data-tooltip-position=\"right\"\n (click)=\"export()\"\n >\n <pry-icon iconSvg=\"file_download\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.export' | i18n }}</span>\n </button>\n </div>\n\n <div\n class=\"ol-control m-layer-switcher\"\n *ngIf=\"((layers$ | async)?.length ?? 0) > 0\"\n [style.top.px]=\"layersTop$ | async\"\n >\n <button\n class=\"m-layer-switcher__toggle a-tooltip\"\n (click)=\"toggleLayersWindow()\"\n [attr.data-tooltip]=\"'@pry.widget.map.selectLayers' | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon iconSvg=\"layers\" [width]=\"22\" [height]=\"22\"></pry-icon>\n </button>\n <ng-container *ngFor=\"let layer of mapLayers; let index = index\">\n <div class=\"m-layer-switcher__title\" [class.-hidden]=\"!layersTabOpen\">\n {{ layer.get('title') }}\n <ng-container *ngIf=\"!(options$ | async)?.singleLayer; else singleLayer\">\n <pry-checkbox [ngModel]=\"layer.getVisible()\" (change)=\"changeVisibility(layer)\"></pry-checkbox>\n </ng-container>\n <ng-template #singleLayer>\n <input\n type=\"radio\"\n name=\"layer\"\n [id]=\"'radio-layer-' + layer.get('title').split(' ')[0]\"\n [ngModel]=\"layerVisibleIdx\"\n [value]=\"index\"\n (change)=\"changeVisibility(layer)\"\n />\n </ng-template>\n </div>\n </ng-container>\n </div>\n\n <div\n class=\"ol-control m-layer-legend\"\n *ngIf=\"((legendLayers$ | async)?.length ?? 0) > 0\"\n [style.top.px]=\"legendTop$ | async\"\n >\n <button\n class=\"m-layer-legend__toggle a-tooltip\"\n (click)=\"toggleLegendWindow()\"\n [attr.data-tooltip]=\"'@pry.widget.map.legends' | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon iconSvg=\"legend\" [width]=\"22\" [height]=\"22\"></pry-icon>\n </button>\n <ng-container *ngFor=\"let geoLayer of legendLayers$ | async; let index = index\">\n <div class=\"m-layer-legend__title\" [class.-hidden]=\"!legendTabOpen\">\n {{ geoLayer.title }}\n <ng-container *ngIf=\"isLayerRendered(geoLayer)\">\n <button class=\"m-layer-legend__toggle\" (click)=\"toggleLegend(index)\">\n <pry-icon\n [iconSvg]=\"legendTab === index ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"22\"\n [height]=\"22\"\n ></pry-icon>\n </button>\n </ng-container>\n <ng-container *ngIf=\"!isLayerRendered(geoLayer)\">\n <pry-icon [iconSvg]=\"'close'\" [width]=\"22\" [height]=\"22\"></pry-icon>\n </ng-container>\n </div>\n <div\n class=\"m-layer-legend__image\"\n [class.-hidden]=\"!legendTabOpen || legendTab !== index || !isLayerRendered(geoLayer)\"\n [style.max-height.px]=\"legendHeight$ | async\"\n >\n <ng-container *ngIf=\"geoLayer | legendUrl : { capabilities: (wmsCapabilities$ | async) } as url\">\n <img\n [src]=\"url | getSecuredImage | async\"\n [alt]=\"'@pry.widget.map.legend' | i18n : { layer: geoLayer.title }\"\n (error)=\"imageNotProvided[index] = true\"\n />\n </ng-container>\n <ng-container *ngIf=\"!(geoLayer | legendUrl : { capabilities: (wmsCapabilities$ | async) })\">\n <p class=\"m-layer-legend__error\">{{ '@pry.widget.map.legendNotProvided' | i18n }}</p>\n </ng-container>\n </div>\n </ng-container>\n </div>\n\n <div class=\"m-map-slide-legend -left\" *ngIf=\"leftSlideLayers.length > 0\" [style.top.px]=\"legendTop$ | async\">\n <span class=\"m-map-slide-legend__title\">{{ '@pry.widget.map.slideTitle' | i18n }}:</span>\n <div *ngFor=\"let layer of leftSlideLayers\">\n {{ layer.get('title') }}\n </div>\n </div>\n\n <div class=\"m-map-slide-legend -right\" *ngIf=\"rightSlideLayers.length > 0\" [style.top.px]=\"legendTop$ | async\">\n <span class=\"m-map-slide-legend__title\">{{ '@pry.widget.map.slideTitle' | i18n }}:</span>\n <div *ngFor=\"let layer of rightSlideLayers\">\n {{ layer.get('title') }}\n </div>\n </div>\n\n <div [style.height.px]=\"height$ | async\" class=\"o-map-wrapper\">\n <div class=\"o-map\">\n <div #mapRef id=\"map\"></div>\n <input\n type=\"range\"\n min=\"0\"\n max=\"100\"\n step=\"0.01\"\n value=\"50\"\n #sliderElement\n class=\"o-map-slider\"\n [class.-hidden]=\"!(hasSlideLayer$ | async)\"\n (input)=\"triggerLayerRender()\"\n />\n </div>\n </div>\n\n <div #popup class=\"m-tooltip m-tooltip--popup\" [hidden]=\"true\" role=\"tooltip\">\n <div class=\"m-tooltip--popup__header\">\n <p>{{ this.tooltipIndex + 1 }} / {{ this.tooltipNumber }}</p>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"tooltipMove(-1)\" [disabled]=\"!tooltipCanMove(-1)\">\n <pry-icon iconSvg=\"arrow_back\"></pry-icon>\n </button>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"tooltipMove(1)\" [disabled]=\"!tooltipCanMove(1)\">\n <pry-icon iconSvg=\"arrow_right\"></pry-icon>\n </button>\n </div>\n <div class=\"m-tooltip--popup__container\">\n <ng-container #popupContent></ng-container>\n </div>\n </div>\n</div>\n" }]
|
|
2329
|
+
args: [{ selector: 'pry-widget-map', template: "<pry-widget-map-css></pry-widget-map-css>\n<div class=\"o-widget o-widget--map\">\n <pry-widget-header\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n #header\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [header]=\"header\"\n [open$]=\"open$\"\n class=\"o-settings\"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_style\">{{ '@pry.widget.map.style' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeStyle($event)\"\n [items]=\"styles$ | async\"\n [ngModel]=\"optionsCopy.style\"\n bindLabel=\"label\"\n bindValue=\"identifier\"\n id=\"map_style\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.style === STYLE_FROM_URL\">\n <label class=\"a-label\" for=\"style_URL\">{{ '@pry.widget.map.styleUrl' | i18n }}</label>\n <input\n id=\"style_URL\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeStyleURL($event)\"\n [value]=\"optionsCopy.styleURL ?? ''\"\n />\n </div>\n\n <pry-checkbox (ngModelChange)=\"changeSingleLayer($event)\" [ngModel]=\"optionsCopy.singleLayer ?? false\">\n {{ '@pry.widget.map.singleLayer' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeAutoLayer($event)\" [ngModel]=\"optionsCopy.automaticLayers ?? false\">\n {{ '@pry.widget.map.autoLayer' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeAttributions($event)\" [ngModel]=\"optionsCopy.attributions ?? false\">\n {{ '@pry.widget.map.attributions' | i18n }}\n </pry-checkbox>\n\n <pry-checkbox (ngModelChange)=\"changeSlideOption($event)\" [ngModel]=\"hasSlideLayer$ | async\">\n {{ '@pry.widget.map.slide.global' | i18n }}\n </pry-checkbox>\n\n <div class=\"o-settings__popup__content__actions -has-separator\">\n <button type=\"button\" (click)=\"addLayer()\" class=\"a-btn a-btn--icon-text -link-like\">\n <pry-icon iconSvg=\"library_add\"></pry-icon>\n {{ '@pry.widget.map.addLayer' | i18n }}\n </button>\n </div>\n\n <div *ngFor=\"let layer of optionsCopy?.layers; let i = index\" class=\"o-settings__popup__content__fields\">\n <div class=\"o-settings__popup__content__fields__head\">\n <h3 class=\"a-h3 settings-layer-title__title\">{{ '@pry.widget.map.layer' | i18n : { index: i + 1 } }}</h3>\n <div class=\"m-btn-group\">\n <button type=\"button\" class=\"a-btn a-btn--icon-only\" (click)=\"invertLayers(i, i - 1)\" *ngIf=\"i > 0\">\n <pry-icon iconSvg=\"fleche_haut\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.moveUp' | i18n }}</span>\n </button>\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only\"\n (click)=\"invertLayers(i, i + 1)\"\n *ngIf=\"i < (optionsCopy?.layers?.length ?? 0) - 1\"\n >\n <pry-icon iconSvg=\"fleche_bas\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.action.moveDown' | i18n }}</span>\n </button>\n </div>\n </div>\n\n <div class=\"o-settings__popup__content__fields__content\">\n <pry-range\n [ngModel]=\"(layer?.opacity ?? 100) + ''\"\n (ngModelChange)=\"changeOpacity(layer, $event)\"\n labelTranslate=\"@pry.widget.map.opacity\"\n min=\"0\"\n max=\"100\"\n ></pry-range>\n\n <fieldset>\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.layerOptions' | i18n : { index: i + 1 } }}</legend>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_layerTitle\">{{ '@pry.widget.map.layerTitle' | i18n }}</label>\n <input\n id=\"map_layerTitle\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeTitle($event, layer)\"\n [value]=\"layer.title ?? ''\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"!['geoserver', 'auto'].includes(layer.type)\">\n <label class=\"a-label\" for=\"map_layerType\">{{ '@pry.widget.map.layerType.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeLayerType($event, i)\"\n [items]=\"layerTypes\"\n [ngModel]=\"layer.type\"\n i18nPrefix=\"@pry.widget.map.layerType.\"\n id=\"map_layerType\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"['geoserver', 'wms'].includes(layer.type)\">\n <ng-container *ngIf=\"getAsWmsType(layer) as wmslayer\">\n <label class=\"a-label\" for=\"map_layerStyle\">{{ '@pry.widget.map.layerStyle' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeLayerStyle($event, layer)\"\n [items]=\"layerStyleOptions(layer)\"\n [ngModel]=\"getStyle(layer)\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"map_layerStyle\"\n ></pry-select>\n </ng-container>\n </div>\n\n <pry-checkbox (ngModelChange)=\"changeFit($event, layer)\" [ngModel]=\"layer.fit\">\n {{ '@pry.widget.map.fit' | i18n }}\n </pry-checkbox>\n\n <div\n *ngIf=\"\n layer.type !== 'relation' &&\n layer.type !== 'wms' &&\n layer.type !== 'wmts' &&\n layer.type !== 'geoserver' &&\n layer.type !== 'featurelayer' &&\n layer.type !== 'vectortile' &&\n layer.type !== 'rastertile' &&\n layer.type !== 'auto'\n \"\n class=\"m-form-label-field\"\n >\n <label class=\"a-label\" for=\"map_classes\">{{ '@pry.widget.map.classes' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeClasses($event, layer)\"\n [items]=\"usedClasses$ | async\"\n [multiple]=\"true\"\n [ngModel]=\"layer.classes\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"map_classes\"\n ></pry-select>\n </div>\n </fieldset>\n </div>\n\n <fieldset\n *ngIf=\"\n layer.type !== 'relation' &&\n layer.type !== 'wms' &&\n layer.type !== 'wmts' &&\n layer.type !== 'geoserver' &&\n layer.type !== 'featurelayer' &&\n layer.type !== 'vectortile' &&\n layer.type !== 'rastertile'\n \"\n >\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.locationAttr' | i18n }}</legend>\n <ng-container\n *ngIf=\"\n layer\n | geometryFieldsFor : { resultSet: resultSet$, classes: layer.classes, type: layer.type }\n | async as fields\n \"\n >\n <div\n *ngIf=\"\n ['heatmap', 'bubble', 'marker', 'point', 'line', 'polygon', 'multi-line', 'multi-polygon'].indexOf(\n layer.type\n ) >= 0\n \"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_locationAttribute_both\">{{\n '@pry.widget.map.locationAttribute.both' | i18n\n }}</label>\n <pry-select\n (ngModelChange)=\"changeLocationAttributes($event, layer)\"\n [items]=\"fields\"\n [ngModel]=\"layer.attribute\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"map_locationAttribute_both\"\n ></pry-select>\n </div>\n </div>\n\n <div *ngIf=\"['heatmap', 'bubble'].indexOf(layer.type) >= 0\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_intensityAttribute\">{{\n '@pry.widget.map.intensityAttribute' | i18n\n }}</label>\n <pry-select\n (ngModelChange)=\"changeIntensityAttributes($event, layer)\"\n [items]=\"fields\"\n [ngModel]=\"layerHasIntensity(layer).intensityAttribute\"\n bindLabel=\"name\"\n bindValue=\"name\"\n id=\"map_intensityAttribute\"\n ></pry-select>\n </div>\n </div>\n </ng-container>\n </fieldset>\n\n <fieldset\n *ngIf=\"\n layer.type === 'wms' ||\n layer.type === 'geoserver' ||\n layer.type === 'wmts' ||\n layer.type === 'featurelayer' ||\n layer.type === 'vectortile' ||\n layer.type === 'rastertile'\n \"\n >\n <ng-container *ngIf=\"layer.type !== 'geoserver'\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"map_wms_url\">{{ '@pry.widget.map.wms.url' | i18n }}</label>\n <input\n id=\"map_wms_url\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeUrl($event, layer)\"\n [value]=\"layer.url\"\n />\n </div>\n </ng-container>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wms' || layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_paramLayer\">{{ '@pry.widget.map.wms.paramLayer' | i18n }}</label>\n <input\n id=\"map_wms_paramLayer\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeParamLayer($event, layer)\"\n [value]=\"layer.paramLayer\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_matrixSet\">{{ '@pry.widget.map.wms.matrixSet' | i18n }}</label>\n <input\n id=\"map_wms_matrixSet\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeMatrixSet($event, layer)\"\n [value]=\"layer.matrixSet\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wmts'\">\n <label class=\"a-label\" for=\"map_wms_style\">{{ '@pry.widget.map.wms.style' | i18n }}</label>\n <input\n id=\"map_wms_style\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeParamStyle($event, layer)\"\n [value]=\"layer.style\"\n />\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"layer.type === 'wms' || layer.type === 'geoserver'\">\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.tile' | i18n }}</legend>\n <pry-checkbox (ngModelChange)=\"changeParamTiled($event, layer)\" [ngModel]=\"layer?.paramTiled ?? false\">\n {{ '@pry.widget.map.wms.paramTiled' | i18n }}\n </pry-checkbox>\n </div>\n </fieldset>\n\n <fieldset *ngIf=\"layer.type === 'marker'\">\n <legend class=\"u-visually-hidden\">{{ '@pry.widget.map.clustering' | i18n }}</legend>\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"changeClustered(layer, $event)\" [ngModel]=\"layer.clustered\">\n {{ '@pry.widget.map.clustered' | i18n }}\n </pry-checkbox>\n </div>\n <div *ngIf=\"layer.clustered\">\n <pry-range\n [ngModel]=\"layer.clustered\"\n (ngModelChange)=\"changeClusterDistance(layer, $event)\"\n labelTranslate=\"@pry.widget.map.clusterDistance\"\n min=\"1\"\n max=\"500\"\n ></pry-range>\n </div>\n </fieldset>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.slide ?? false\">\n <label class=\"a-label\" for=\"slide_select\">{{ '@pry.widget.map.slide.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeSlide($event, layer)\"\n [items]=\"slides\"\n [ngModel]=\"layer.slide ?? 'all'\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"slide_select\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\" *ngIf=\"optionsCopy.attributions\">\n <label class=\"a-label\" for=\"attribution\">{{ '@pry.widget.map.attribution' | i18n }}</label>\n <input\n id=\"attribution\"\n class=\"a-form-field\"\n type=\"text\"\n (input)=\"changeAttribution($event, layer)\"\n [value]=\"layer.attribution ? layer.attribution : ''\"\n />\n </div>\n\n <button\n type=\"button\"\n (click)=\"deleteLayer(i, layer)\"\n class=\"a-btn a-btn--icon-text -link-like\"\n *ngIf=\"layer.type !== 'geoserver'\"\n data-func=\"delete\"\n >\n <pry-icon iconSvg=\"delete\" [width]=\"19\" [height]=\"19\"></pry-icon>\n <span>{{ '@pry.widget.map.deleteLayer' | i18n }}</span>\n </button>\n </div>\n </pry-settings>\n </pry-widget-header>\n\n <div\n class=\"m-btn-group -map-selection-choice -vertical\"\n [class.-with-header]=\"displayHeader$ | async\"\n [class.-closed]=\"!(actionMenuOpen$ | async)\"\n >\n <div class=\"-vertical\">\n <ng-container *ngFor=\"let action of basicActions$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip a-tooltip--{{ action }}\"\n (click)=\"changeSelection(action)\"\n [class.-selected]=\"(interactionManager.selectionInteraction.selectionType$ | async) === action\"\n [attr.data-tooltip]=\"'@pry.widget.map.' + action | i18n\"\n data-tooltip-position=\"right\"\n >\n <pry-icon [iconSvg]=\"action\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.' + action | i18n }}</span>\n </button>\n </ng-container>\n </div>\n\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip -map-toggle\"\n id=\"open_menu\"\n [attr.aria-expanded]=\"actionMenuOpen$ | async\"\n aria-controls=\"export_type\"\n aria-haspopup=\"menu\"\n (click)=\"toggleMenu()\"\n >\n <pry-icon\n [iconSvg]=\"(actionMenuOpen$ | async) ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"12\"\n [height]=\"24\"\n ></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.open' | i18n }}</span>\n </button>\n </div>\n\n <div class=\"m-btn-group -map-selection-choice -map-export\" [class.-with-header]=\"displayHeader$ | async\">\n <button\n type=\"button\"\n class=\"a-btn a-btn--icon-only a-tooltip\"\n id=\"export_card\"\n aria-expanded=\"false\"\n aria-controls=\"export_type\"\n aria-haspopup=\"menu\"\n [attr.data-tooltip]=\"'@pry.widget.map.export' | i18n\"\n data-tooltip-position=\"right\"\n (click)=\"export()\"\n >\n <pry-icon iconSvg=\"file_download\"></pry-icon>\n <span class=\"u-visually-hidden\">{{ '@pry.widget.map.export' | i18n }}</span>\n </button>\n </div>\n\n <div\n class=\"ol-control m-layer-switcher m-map-layer-action\"\n *ngIf=\"((layers$ | async)?.length ?? 0) > 0\"\n [style.top.px]=\"layersTop$ | async\"\n >\n <button\n class=\"m-map-layer-action__toggle\"\n [class.a-tooltip]=\"!this.layersTabOpen\"\n [class.-tooltip-no-wrap]=\"!this.layersTabOpen\"\n (click)=\"toggleLayersWindow()\"\n [attr.data-tooltip]=\"'@pry.widget.map.selectLayers' | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon iconSvg=\"layers\" [width]=\"18\" [height]=\"18\"></pry-icon>\n </button>\n <div class=\"m-map-layer-action__container\" [class.-hidden]=\"!layersTabOpen\">\n <span class=\"a-h4\">{{ '@pry.widget.map.layersTitle' | i18n }}</span>\n <ng-container *ngFor=\"let layer of mapLayers; let index = index\">\n <div class=\"m-map-layer-action__title m-layer-switcher__title\" [class.-hidden]=\"!layersTabOpen\">\n <pry-checkbox\n *ngIf=\"!(options$ | async)?.singleLayer; else singleLayer\"\n [ngModel]=\"layer.getVisible()\"\n (change)=\"changeVisibility(layer)\"\n ></pry-checkbox>\n <ng-template #singleLayer>\n <input\n type=\"radio\"\n name=\"layer\"\n [id]=\"'radio-layer-' + layer.get('title').split(' ')[0]\"\n [ngModel]=\"layerVisibleIdx\"\n [value]=\"index\"\n (change)=\"changeVisibility(layer)\"\n />\n </ng-template>\n {{ layer.get('title') }}\n </div>\n </ng-container>\n </div>\n </div>\n\n <div\n class=\"ol-control m-map-layer-action m-layer-legend\"\n *ngIf=\"((legendLayers$ | async)?.length ?? 0) > 0\"\n [style.top.px]=\"legendTop$ | async\"\n >\n <button\n class=\"m-map-layer-action__toggle\"\n [class.a-tooltip]=\"!this.legendTabOpen\"\n [class.-tooltip-no-wrap]=\"!this.legendTabOpen\"\n (click)=\"toggleLegendWindow()\"\n [attr.data-tooltip]=\"'@pry.widget.map.legends' | i18n\"\n data-tooltip-position=\"left\"\n >\n <pry-icon iconSvg=\"legend\" [width]=\"18\" [height]=\"15\"></pry-icon>\n </button>\n <div class=\"m-map-layer-action__container\" [class.-hidden]=\"!legendTabOpen\">\n <span class=\"a-h4\">{{ '@pry.widget.map.legendsTitle' | i18n }}</span>\n <ng-container *ngFor=\"let geoLayer of legendLayers$ | async; let index = index\">\n <div class=\"m-map-layer-action__title m-layer-legend__title\" (click)=\"toggleLegend(index)\">\n <pry-icon\n *ngIf=\"isLayerRendered(geoLayer) && !!geoLayer.title\"\n class=\"m-layer-legend__dropdown-icon\"\n [iconSvg]=\"legendTab === index ? 'chevron_top' : 'chevron_bottom'\"\n [width]=\"12\"\n [height]=\"12\"\n ></pry-icon>\n {{ geoLayer.title }}\n <pry-icon\n *ngIf=\"!isLayerRendered(geoLayer)\"\n class=\"a-tooltip\"\n [attr.data-tooltip]=\"'@pry.widget.map.layerLoadError' | i18n\"\n [iconSvg]=\"'close'\"\n [width]=\"22\"\n [height]=\"22\"\n ></pry-icon>\n </div>\n <div\n class=\"m-map-layer-action__image\"\n [class.-hidden]=\"!legendTabOpen || legendTab !== index || !isLayerRendered(geoLayer)\"\n [style.max-height.px]=\"legendHeight$ | async\"\n >\n <ng-container *ngIf=\"geoLayer | legendUrl : { capabilities: (wmsCapabilities$ | async) } as url\">\n <img\n [src]=\"url | getSecuredImage | async\"\n [alt]=\"'@pry.widget.map.legend' | i18n : { layer: geoLayer.title }\"\n (error)=\"imageNotProvided[index] = true\"\n />\n </ng-container>\n <ng-container *ngIf=\"!(geoLayer | legendUrl : { capabilities: (wmsCapabilities$ | async) })\">\n <p class=\"m-map-layer-action__error\">{{ '@pry.widget.map.legendNotProvided' | i18n }}</p>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n\n <div class=\"m-map-slide-legend -left\" *ngIf=\"leftSlideLayers.length > 0\" [style.top.px]=\"legendTop$ | async\">\n <span class=\"m-map-slide-legend__title\">{{ '@pry.widget.map.slideTitle' | i18n }}:</span>\n <div *ngFor=\"let layer of leftSlideLayers\">\n {{ layer.get('title') }}\n </div>\n </div>\n\n <div class=\"m-map-slide-legend -right\" *ngIf=\"rightSlideLayers.length > 0\" [style.top.px]=\"legendTop$ | async\">\n <span class=\"m-map-slide-legend__title\">{{ '@pry.widget.map.slideTitle' | i18n }}:</span>\n <div *ngFor=\"let layer of rightSlideLayers\">\n {{ layer.get('title') }}\n </div>\n </div>\n\n <div [style.height.px]=\"height$ | async\" class=\"o-map-wrapper\">\n <div class=\"o-map\">\n <div #mapRef id=\"map\"></div>\n <input\n type=\"range\"\n min=\"0\"\n max=\"100\"\n step=\"0.01\"\n value=\"50\"\n #sliderElement\n class=\"o-map-slider\"\n [class.-hidden]=\"!(hasSlideLayer$ | async)\"\n (input)=\"triggerLayerRender()\"\n />\n </div>\n </div>\n\n <div #popup class=\"m-tooltip m-tooltip--popup\" [hidden]=\"true\" role=\"tooltip\">\n <div class=\"m-tooltip--popup__header\">\n <p>{{ this.tooltipIndex + 1 }} / {{ this.tooltipNumber }}</p>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"tooltipMove(-1)\" [disabled]=\"!tooltipCanMove(-1)\">\n <pry-icon iconSvg=\"arrow_back\"></pry-icon>\n </button>\n <button class=\"a-btn a-btn--primary a-btn--icon-only\" (click)=\"tooltipMove(1)\" [disabled]=\"!tooltipCanMove(1)\">\n <pry-icon iconSvg=\"arrow_right\"></pry-icon>\n </button>\n </div>\n <div class=\"m-tooltip--popup__container\">\n <ng-container #popupContent></ng-container>\n </div>\n </div>\n</div>\n" }]
|
|
2283
2330
|
}], ctorParameters: function () { return [{ type: i1.Store }, { type: i2.PryI18nService }, { type: i2.TooltipFactoryService }, { type: i2.SymbolService }, { type: i0.Injector }, { type: WidgetMapLayerService }, { type: i2.PryAggregationService }, { type: i0.ElementRef }, { type: i2.PryGeoAuthService, decorators: [{
|
|
2284
2331
|
type: Optional
|
|
2285
2332
|
}, {
|
|
@@ -2376,7 +2423,9 @@ const enTranslations = {
|
|
|
2376
2423
|
export: 'Export map',
|
|
2377
2424
|
legend: 'Legend of layer {{layer}}',
|
|
2378
2425
|
legendNotProvided: 'Legend not provided by server',
|
|
2426
|
+
layersTitle: 'Layers',
|
|
2379
2427
|
selectLayers: 'Select layers',
|
|
2428
|
+
legendsTitle: 'Legend',
|
|
2380
2429
|
legends: 'Display legend',
|
|
2381
2430
|
singleLayer: 'Single layer mode',
|
|
2382
2431
|
autoLayer: 'Automatic datasource layers configuration',
|
|
@@ -2390,7 +2439,8 @@ const enTranslations = {
|
|
|
2390
2439
|
open: 'Open/Close menu',
|
|
2391
2440
|
zoomIn: 'Zoom In',
|
|
2392
2441
|
zoomOut: 'Zoom Out',
|
|
2393
|
-
slideTitle: 'Displayed data'
|
|
2442
|
+
slideTitle: 'Displayed data',
|
|
2443
|
+
layerLoadError: 'Error loading in layer data'
|
|
2394
2444
|
}
|
|
2395
2445
|
}
|
|
2396
2446
|
}
|
|
@@ -2468,8 +2518,10 @@ const frTranslations = {
|
|
|
2468
2518
|
click: 'Sélectionner par clic',
|
|
2469
2519
|
zoom: 'Zoom par rectangle',
|
|
2470
2520
|
export: 'Exporter la carte',
|
|
2521
|
+
legendsTitle: 'Légende',
|
|
2471
2522
|
legend: 'Légende de la couche {{layer}}',
|
|
2472
2523
|
legendNotProvided: 'Légende non fournie par le serveur',
|
|
2524
|
+
layersTitle: 'Couches',
|
|
2473
2525
|
selectLayers: 'Sélectionner les couches',
|
|
2474
2526
|
legends: 'Afficher la légende',
|
|
2475
2527
|
singleLayer: 'Mode mono-couche',
|
|
@@ -2484,7 +2536,8 @@ const frTranslations = {
|
|
|
2484
2536
|
open: 'Ouverture/Fermeture menu',
|
|
2485
2537
|
zoomIn: 'Zoomer',
|
|
2486
2538
|
zoomOut: 'Dézoomer',
|
|
2487
|
-
slideTitle: 'Données affichées'
|
|
2539
|
+
slideTitle: 'Données affichées',
|
|
2540
|
+
layerLoadError: 'Erreur de chargement de la couche'
|
|
2488
2541
|
}
|
|
2489
2542
|
}
|
|
2490
2543
|
}
|