@igo2/geo 1.14.3 → 1.14.4
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/icons/cross_black_18px.svg +88 -88
- package/assets/icons/place_blue_36px.svg +55 -55
- package/assets/icons/place_green_36px.svg +55 -55
- package/assets/icons/place_red_36px.svg +55 -55
- package/assets/icons/place_yellow_36px.svg +55 -55
- package/esm2020/igo2-geo.mjs +4 -4
- package/esm2020/lib/catalog/catalog-browser/catalog-browser-group.component.mjs +300 -300
- package/esm2020/lib/catalog/catalog-browser/catalog-browser-layer.component.mjs +305 -305
- package/esm2020/lib/catalog/catalog-browser/catalog-browser.component.mjs +246 -246
- package/esm2020/lib/catalog/catalog-browser/catalog-browser.module.mjs +79 -79
- package/esm2020/lib/catalog/catalog-library/add-catalog-dialog.component.mjs +208 -208
- package/esm2020/lib/catalog/catalog-library/catalog-library-item.component.mjs +78 -78
- package/esm2020/lib/catalog/catalog-library/catalog-library.component.mjs +216 -216
- package/esm2020/lib/catalog/catalog-library/catalog-library.module.mjs +94 -94
- package/esm2020/lib/catalog/catalog.module.mjs +52 -52
- package/esm2020/lib/catalog/index.mjs +4 -4
- package/esm2020/lib/catalog/shared/catalog.abstract.mjs +94 -94
- package/esm2020/lib/catalog/shared/catalog.enum.mjs +15 -15
- package/esm2020/lib/catalog/shared/catalog.interface.mjs +1 -1
- package/esm2020/lib/catalog/shared/catalog.service.mjs +605 -605
- package/esm2020/lib/catalog/shared/index.mjs +5 -5
- package/esm2020/lib/datasource/datasource.module.mjs +21 -21
- package/esm2020/lib/datasource/index.mjs +3 -3
- package/esm2020/lib/datasource/shared/capabilities.service.mjs +431 -431
- package/esm2020/lib/datasource/shared/datasource.service.mjs +235 -235
- package/esm2020/lib/datasource/shared/datasources/any-datasource.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/any-datasource.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/arcgisrest-datasource.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/arcgisrest-datasource.mjs +144 -144
- package/esm2020/lib/datasource/shared/datasources/carto-datasource.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/carto-datasource.mjs +108 -108
- package/esm2020/lib/datasource/shared/datasources/cluster-datasource.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/cluster-datasource.mjs +14 -14
- package/esm2020/lib/datasource/shared/datasources/data.service.mjs +2 -2
- package/esm2020/lib/datasource/shared/datasources/datasource.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/datasource.mjs +28 -28
- package/esm2020/lib/datasource/shared/datasources/feature-datasource.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/feature-datasource.mjs +42 -42
- package/esm2020/lib/datasource/shared/datasources/imagearcgisrest-datasource.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/imagearcgisrest-datasource.mjs +56 -56
- package/esm2020/lib/datasource/shared/datasources/index.mjs +36 -36
- package/esm2020/lib/datasource/shared/datasources/mvt-datasource.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/mvt-datasource.mjs +27 -27
- package/esm2020/lib/datasource/shared/datasources/osm-datasource.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/osm-datasource.mjs +11 -11
- package/esm2020/lib/datasource/shared/datasources/tilearcgisrest-datasource.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/tilearcgisrest-datasource.mjs +48 -48
- package/esm2020/lib/datasource/shared/datasources/tiledebug-datasource.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/tiledebug-datasource.mjs +14 -14
- package/esm2020/lib/datasource/shared/datasources/websocket-datasource.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/websocket-datasource.mjs +53 -53
- package/esm2020/lib/datasource/shared/datasources/wfs-datasource.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/wfs-datasource.mjs +71 -71
- package/esm2020/lib/datasource/shared/datasources/wfs.service.mjs +151 -151
- package/esm2020/lib/datasource/shared/datasources/wms-datasource.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/wms-datasource.mjs +205 -205
- package/esm2020/lib/datasource/shared/datasources/wms-wfs.utils.mjs +206 -206
- package/esm2020/lib/datasource/shared/datasources/wmts-datasource.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/wmts-datasource.mjs +15 -15
- package/esm2020/lib/datasource/shared/datasources/xyz-datasource.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/datasources/xyz-datasource.mjs +8 -8
- package/esm2020/lib/datasource/shared/index.mjs +4 -4
- package/esm2020/lib/datasource/shared/options/index.mjs +4 -4
- package/esm2020/lib/datasource/shared/options/options-api.interface.mjs +1 -1
- package/esm2020/lib/datasource/shared/options/options-api.providers.mjs +14 -14
- package/esm2020/lib/datasource/shared/options/options-api.service.mjs +80 -80
- package/esm2020/lib/datasource/shared/options/options.service.mjs +2 -2
- package/esm2020/lib/datasource/utils/esri-style-generator.mjs +356 -356
- package/esm2020/lib/datasource/utils/index.mjs +2 -2
- package/esm2020/lib/datasource/utils/tilegrid.mjs +19 -19
- package/esm2020/lib/directions/directions-buttons/directions-buttons.component.mjs +223 -223
- package/esm2020/lib/directions/directions-buttons/index.mjs +2 -2
- package/esm2020/lib/directions/directions-inputs/directions-inputs.component.mjs +289 -289
- package/esm2020/lib/directions/directions-inputs/index.mjs +2 -2
- package/esm2020/lib/directions/directions-results/directions-results.component.mjs +195 -195
- package/esm2020/lib/directions/directions-results/index.mjs +2 -2
- package/esm2020/lib/directions/directions-sources/directions-source.interface.mjs +1 -1
- package/esm2020/lib/directions/directions-sources/directions-source.mjs +2 -2
- package/esm2020/lib/directions/directions-sources/directions-source.provider.mjs +15 -15
- package/esm2020/lib/directions/directions-sources/index.mjs +5 -5
- package/esm2020/lib/directions/directions-sources/osrm-directions-source.mjs +99 -99
- package/esm2020/lib/directions/directions.component.mjs +310 -310
- package/esm2020/lib/directions/directions.module.mjs +101 -101
- package/esm2020/lib/directions/index.mjs +7 -7
- package/esm2020/lib/directions/shared/directions-source.service.mjs +17 -17
- package/esm2020/lib/directions/shared/directions.enum.mjs +28 -28
- package/esm2020/lib/directions/shared/directions.interface.mjs +1 -1
- package/esm2020/lib/directions/shared/directions.service.mjs +28 -28
- package/esm2020/lib/directions/shared/directions.utils.mjs +508 -508
- package/esm2020/lib/directions/shared/index.mjs +6 -6
- package/esm2020/lib/directions/shared/store.mjs +23 -23
- package/esm2020/lib/download/download-button/download-button.component.mjs +60 -60
- package/esm2020/lib/download/download-button/index.mjs +2 -2
- package/esm2020/lib/download/download.module.mjs +41 -41
- package/esm2020/lib/download/index.mjs +3 -3
- package/esm2020/lib/download/shared/download.interface.mjs +2 -2
- package/esm2020/lib/download/shared/download.service.mjs +64 -64
- package/esm2020/lib/download/shared/index.mjs +3 -3
- package/esm2020/lib/draw/draw/draw-layer-popup.component.mjs +54 -54
- package/esm2020/lib/draw/draw/draw-popup.component.mjs +590 -590
- package/esm2020/lib/draw/draw/draw-shorcuts.component.mjs +47 -47
- package/esm2020/lib/draw/draw/draw.component.mjs +1298 -1298
- package/esm2020/lib/draw/draw/draw.module.mjs +112 -112
- package/esm2020/lib/draw/drawingTool.module.mjs +19 -19
- package/esm2020/lib/draw/index.mjs +3 -3
- package/esm2020/lib/draw/shared/draw-icon.service.mjs +26 -26
- package/esm2020/lib/draw/shared/draw-style.service.mjs +189 -189
- package/esm2020/lib/draw/shared/draw.enum.mjs +36 -36
- package/esm2020/lib/draw/shared/draw.interface.mjs +1 -1
- package/esm2020/lib/draw/shared/draw.utils.mjs +121 -121
- package/esm2020/lib/draw/shared/index.mjs +5 -5
- package/esm2020/lib/feature/feature-details/feature-details.component.mjs +404 -404
- package/esm2020/lib/feature/feature-details/feature-details.directive.mjs +53 -53
- package/esm2020/lib/feature/feature-details/feature-details.module.mjs +47 -47
- package/esm2020/lib/feature/feature-form/feature-form.component.mjs +111 -111
- package/esm2020/lib/feature/feature-form/feature-form.module.mjs +33 -33
- package/esm2020/lib/feature/feature.module.mjs +27 -27
- package/esm2020/lib/feature/index.mjs +3 -3
- package/esm2020/lib/feature/shared/feature.enums.mjs +9 -9
- package/esm2020/lib/feature/shared/feature.interfaces.mjs +1 -1
- package/esm2020/lib/feature/shared/feature.utils.mjs +346 -346
- package/esm2020/lib/feature/shared/index.mjs +6 -6
- package/esm2020/lib/feature/shared/store.mjs +123 -123
- package/esm2020/lib/feature/shared/strategies/in-map-extent.mjs +112 -112
- package/esm2020/lib/feature/shared/strategies/in-map-resolution.mjs +93 -93
- package/esm2020/lib/feature/shared/strategies/index.mjs +5 -5
- package/esm2020/lib/feature/shared/strategies/loading-layer.mjs +103 -103
- package/esm2020/lib/feature/shared/strategies/loading.mjs +132 -132
- package/esm2020/lib/feature/shared/strategies/selection.mjs +369 -369
- package/esm2020/lib/feature/shared/strategies.utils.mjs +36 -36
- package/esm2020/lib/filter/filter.module.mjs +288 -288
- package/esm2020/lib/filter/index.mjs +15 -15
- package/esm2020/lib/filter/ogc-filter-button/index.mjs +1 -1
- package/esm2020/lib/filter/ogc-filter-button/ogc-filter-button.component.mjs +139 -139
- package/esm2020/lib/filter/ogc-filter-form/index.mjs +1 -1
- package/esm2020/lib/filter/ogc-filter-form/ogc-filter-form.component.mjs +644 -644
- package/esm2020/lib/filter/ogc-filter-selection/index.mjs +1 -1
- package/esm2020/lib/filter/ogc-filter-selection/ogc-filter-selection.component.mjs +1301 -1301
- package/esm2020/lib/filter/ogc-filter-time/index.mjs +2 -2
- package/esm2020/lib/filter/ogc-filter-time/ogc-filter-time-slider.component.mjs +176 -176
- package/esm2020/lib/filter/ogc-filter-time/ogc-filter-time.component.mjs +897 -897
- package/esm2020/lib/filter/ogc-filterable-form/index.mjs +1 -1
- package/esm2020/lib/filter/ogc-filterable-form/ogc-filterable-form.component.mjs +58 -58
- package/esm2020/lib/filter/ogc-filterable-item/index.mjs +1 -1
- package/esm2020/lib/filter/ogc-filterable-item/ogc-filterable-item.component.mjs +306 -306
- package/esm2020/lib/filter/ogc-filterable-list/index.mjs +2 -2
- package/esm2020/lib/filter/ogc-filterable-list/ogc-filterable-list-binding.directive.mjs +30 -30
- package/esm2020/lib/filter/ogc-filterable-list/ogc-filterable-list.component.mjs +43 -43
- package/esm2020/lib/filter/shared/filterable-datasource.pipe.mjs +54 -54
- package/esm2020/lib/filter/shared/index.mjs +11 -11
- package/esm2020/lib/filter/shared/ogc-filter-time.service.mjs +71 -71
- package/esm2020/lib/filter/shared/ogc-filter.enum.mjs +29 -29
- package/esm2020/lib/filter/shared/ogc-filter.interface.mjs +1 -1
- package/esm2020/lib/filter/shared/ogc-filter.mjs +691 -691
- package/esm2020/lib/filter/shared/ogc-filter.service.mjs +45 -45
- package/esm2020/lib/filter/shared/spatial-filter.enum.mjs +22 -22
- package/esm2020/lib/filter/shared/spatial-filter.interface.mjs +1 -1
- package/esm2020/lib/filter/shared/spatial-filter.service.mjs +268 -268
- package/esm2020/lib/filter/shared/time-filter.enum.mjs +12 -12
- package/esm2020/lib/filter/shared/time-filter.interface.mjs +1 -1
- package/esm2020/lib/filter/shared/time-filter.service.mjs +106 -106
- package/esm2020/lib/filter/spatial-filter/spatial-filter-item/index.mjs +1 -1
- package/esm2020/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.mjs +1088 -1088
- package/esm2020/lib/filter/spatial-filter/spatial-filter-list/index.mjs +1 -1
- package/esm2020/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.mjs +207 -207
- package/esm2020/lib/filter/spatial-filter/spatial-filter-type/index.mjs +1 -1
- package/esm2020/lib/filter/spatial-filter/spatial-filter-type/spatial-filter-type.component.mjs +143 -143
- package/esm2020/lib/filter/time-filter-button/index.mjs +1 -1
- package/esm2020/lib/filter/time-filter-button/time-filter-button.component.mjs +77 -77
- package/esm2020/lib/filter/time-filter-form/index.mjs +1 -1
- package/esm2020/lib/filter/time-filter-form/time-filter-form.component.mjs +733 -733
- package/esm2020/lib/filter/time-filter-item/index.mjs +1 -1
- package/esm2020/lib/filter/time-filter-item/time-filter-item.component.mjs +118 -118
- package/esm2020/lib/filter/time-filter-list/index.mjs +2 -2
- package/esm2020/lib/filter/time-filter-list/time-filter-list-binding.directive.mjs +30 -30
- package/esm2020/lib/filter/time-filter-list/time-filter-list.component.mjs +38 -38
- package/esm2020/lib/geo.module.mjs +101 -101
- package/esm2020/lib/geometry/geometry-form-field/geometry-form-field-input.component.mjs +520 -520
- package/esm2020/lib/geometry/geometry-form-field/geometry-form-field.component.mjs +188 -188
- package/esm2020/lib/geometry/geometry-form-field/geometry-form-field.module.mjs +63 -63
- package/esm2020/lib/geometry/geometry.module.mjs +26 -26
- package/esm2020/lib/geometry/index.mjs +3 -3
- package/esm2020/lib/geometry/shared/controls/draw.mjs +313 -313
- package/esm2020/lib/geometry/shared/controls/index.mjs +4 -4
- package/esm2020/lib/geometry/shared/controls/modify.mjs +520 -520
- package/esm2020/lib/geometry/shared/controls/slice.mjs +176 -176
- package/esm2020/lib/geometry/shared/geometry.errors.mjs +25 -25
- package/esm2020/lib/geometry/shared/geometry.interfaces.mjs +1 -1
- package/esm2020/lib/geometry/shared/geometry.utils.mjs +121 -121
- package/esm2020/lib/geometry/shared/index.mjs +5 -5
- package/esm2020/lib/import-export/export-button/export-button.component.mjs +63 -63
- package/esm2020/lib/import-export/export-button/index.mjs +2 -2
- package/esm2020/lib/import-export/import-export/import-export.component.mjs +1219 -1219
- package/esm2020/lib/import-export/import-export/index.mjs +2 -2
- package/esm2020/lib/import-export/import-export.module.mjs +95 -95
- package/esm2020/lib/import-export/index.mjs +4 -4
- package/esm2020/lib/import-export/shared/drop-geo-file.directive.mjs +134 -134
- package/esm2020/lib/import-export/shared/export.errors.mjs +15 -15
- package/esm2020/lib/import-export/shared/export.interface.mjs +1 -1
- package/esm2020/lib/import-export/shared/export.service.mjs +194 -194
- package/esm2020/lib/import-export/shared/export.type.mjs +3 -3
- package/esm2020/lib/import-export/shared/export.utils.mjs +54 -54
- package/esm2020/lib/import-export/shared/import.errors.mjs +38 -38
- package/esm2020/lib/import-export/shared/import.interface.mjs +1 -1
- package/esm2020/lib/import-export/shared/import.service.mjs +214 -214
- package/esm2020/lib/import-export/shared/import.utils.mjs +234 -234
- package/esm2020/lib/import-export/shared/index.mjs +11 -11
- package/esm2020/lib/import-export/style-list/index.mjs +4 -4
- package/esm2020/lib/import-export/style-list/style-list.interface.mjs +1 -1
- package/esm2020/lib/import-export/style-list/style-list.module.mjs +22 -22
- package/esm2020/lib/import-export/style-list/style-list.provider.mjs +20 -20
- package/esm2020/lib/import-export/style-list/style-list.service.mjs +50 -50
- package/esm2020/lib/layer/index.mjs +10 -10
- package/esm2020/lib/layer/layer-item/index.mjs +1 -1
- package/esm2020/lib/layer/layer-item/layer-item.component.mjs +299 -299
- package/esm2020/lib/layer/layer-legend/index.mjs +1 -1
- package/esm2020/lib/layer/layer-legend/layer-legend.component.mjs +387 -387
- package/esm2020/lib/layer/layer-legend-item/index.mjs +1 -1
- package/esm2020/lib/layer/layer-legend-item/layer-legend-item.component.mjs +83 -83
- package/esm2020/lib/layer/layer-legend-list/index.mjs +2 -2
- package/esm2020/lib/layer/layer-legend-list/layer-legend-list-binding.directive.mjs +47 -47
- package/esm2020/lib/layer/layer-legend-list/layer-legend-list.component.mjs +194 -194
- package/esm2020/lib/layer/layer-list/index.mjs +3 -3
- package/esm2020/lib/layer/layer-list/layer-list-binding.directive.mjs +58 -58
- package/esm2020/lib/layer/layer-list/layer-list.component.mjs +1008 -1008
- package/esm2020/lib/layer/layer-list/layer-list.enum.mjs +18 -18
- package/esm2020/lib/layer/layer-list-tool/index.mjs +4 -4
- package/esm2020/lib/layer/layer-list-tool/layer-list-tool.component.mjs +164 -164
- package/esm2020/lib/layer/layer-list-tool/layer-list-tool.enum.mjs +6 -6
- package/esm2020/lib/layer/layer-list-tool/layer-list-tool.interface.mjs +1 -1
- package/esm2020/lib/layer/layer-list-tool/layer-list-tool.service.mjs +21 -21
- package/esm2020/lib/layer/layer.module.mjs +184 -184
- package/esm2020/lib/layer/shared/clusterParam.mjs +1 -1
- package/esm2020/lib/layer/shared/index.mjs +6 -6
- package/esm2020/lib/layer/shared/layer.enums.mjs +1 -1
- package/esm2020/lib/layer/shared/layer.service.mjs +185 -185
- package/esm2020/lib/layer/shared/layers/any-layer.interface.mjs +1 -1
- package/esm2020/lib/layer/shared/layers/any-layer.mjs +1 -1
- package/esm2020/lib/layer/shared/layers/image-layer.interface.mjs +1 -1
- package/esm2020/lib/layer/shared/layers/image-layer.mjs +67 -67
- package/esm2020/lib/layer/shared/layers/index.mjs +13 -13
- package/esm2020/lib/layer/shared/layers/layer.interface.mjs +16 -16
- package/esm2020/lib/layer/shared/layers/layer.mjs +163 -163
- package/esm2020/lib/layer/shared/layers/tile-layer.interface.mjs +1 -1
- package/esm2020/lib/layer/shared/layers/tile-layer.mjs +46 -46
- package/esm2020/lib/layer/shared/layers/vector-layer.interface.mjs +1 -1
- package/esm2020/lib/layer/shared/layers/vector-layer.mjs +377 -377
- package/esm2020/lib/layer/shared/layers/vectortile-layer.interface.mjs +1 -1
- package/esm2020/lib/layer/shared/layers/vectortile-layer.mjs +103 -103
- package/esm2020/lib/layer/shared/style.service.mjs +355 -355
- package/esm2020/lib/layer/shared/vector-style.interface.mjs +1 -1
- package/esm2020/lib/layer/style-modal/index.mjs +1 -1
- package/esm2020/lib/layer/style-modal/style-modal.component.mjs +287 -287
- package/esm2020/lib/layer/track-feature-button/index.mjs +1 -1
- package/esm2020/lib/layer/track-feature-button/track-feature-button.component.mjs +58 -58
- package/esm2020/lib/layer/utils/image-watcher.mjs +61 -61
- package/esm2020/lib/layer/utils/index.mjs +5 -5
- package/esm2020/lib/layer/utils/layer.utils.mjs +9 -9
- package/esm2020/lib/layer/utils/outputLegend.mjs +26 -26
- package/esm2020/lib/layer/utils/tile-watcher.mjs +49 -49
- package/esm2020/lib/layer/utils/vector-watcher.mjs +47 -47
- package/esm2020/lib/map/baselayers-switcher/baselayers-switcher.animation.mjs +19 -19
- package/esm2020/lib/map/baselayers-switcher/baselayers-switcher.component.mjs +96 -96
- package/esm2020/lib/map/baselayers-switcher/index.mjs +2 -2
- package/esm2020/lib/map/baselayers-switcher/mini-basemap.component.mjs +140 -140
- package/esm2020/lib/map/geolocate-button/geolocate-button.component.mjs +78 -78
- package/esm2020/lib/map/geolocate-button/index.mjs +1 -1
- package/esm2020/lib/map/home-extent-button/home-extent-button.component.mjs +62 -62
- package/esm2020/lib/map/home-extent-button/index.mjs +1 -1
- package/esm2020/lib/map/index.mjs +13 -13
- package/esm2020/lib/map/info-section/index.mjs +1 -1
- package/esm2020/lib/map/info-section/info-section.component.mjs +29 -29
- package/esm2020/lib/map/map-browser/index.mjs +1 -1
- package/esm2020/lib/map/map-browser/map-browser.component.mjs +65 -65
- package/esm2020/lib/map/map-center/index.mjs +1 -1
- package/esm2020/lib/map/map-center/map-center.component.mjs +49 -49
- package/esm2020/lib/map/map.module.mjs +126 -126
- package/esm2020/lib/map/menu-button/index.mjs +1 -1
- package/esm2020/lib/map/menu-button/menu-button.component.mjs +61 -61
- package/esm2020/lib/map/offline-button/index.mjs +1 -1
- package/esm2020/lib/map/offline-button/offline-button.component.mjs +75 -75
- package/esm2020/lib/map/rotation-button/index.mjs +1 -1
- package/esm2020/lib/map/rotation-button/rotation-button.component.mjs +69 -69
- package/esm2020/lib/map/shared/controllers/controller.mjs +41 -41
- package/esm2020/lib/map/shared/controllers/geolocation.mjs +307 -307
- package/esm2020/lib/map/shared/controllers/index.mjs +3 -3
- package/esm2020/lib/map/shared/controllers/view.mjs +350 -350
- package/esm2020/lib/map/shared/hover-feature.directive.mjs +502 -502
- package/esm2020/lib/map/shared/index.mjs +13 -13
- package/esm2020/lib/map/shared/linkedLayers.utils.mjs +237 -237
- package/esm2020/lib/map/shared/map-pointer-position.directive.mjs +106 -106
- package/esm2020/lib/map/shared/map.enums.mjs +5 -5
- package/esm2020/lib/map/shared/map.interface.mjs +1 -1
- package/esm2020/lib/map/shared/map.mjs +412 -407
- package/esm2020/lib/map/shared/map.service.mjs +28 -28
- package/esm2020/lib/map/shared/map.utils.mjs +462 -462
- package/esm2020/lib/map/shared/mapOffline.directive.mjs +162 -162
- package/esm2020/lib/map/shared/projection.interfaces.mjs +1 -1
- package/esm2020/lib/map/shared/projection.service.mjs +64 -64
- package/esm2020/lib/map/shared/projection.utils.mjs +63 -63
- package/esm2020/lib/map/swipe-control/index.mjs +1 -1
- package/esm2020/lib/map/swipe-control/swipe-control.component.mjs +192 -192
- package/esm2020/lib/map/utils/layer-watcher.mjs +78 -78
- package/esm2020/lib/map/wake-lock-button/index.mjs +1 -1
- package/esm2020/lib/map/wake-lock-button/wake-lock-button.component.mjs +113 -113
- package/esm2020/lib/map/zoom-button/index.mjs +1 -1
- package/esm2020/lib/map/zoom-button/zoom-button.component.mjs +39 -39
- package/esm2020/lib/measure/index.mjs +3 -3
- package/esm2020/lib/measure/measure.module.mjs +19 -19
- package/esm2020/lib/measure/measurer/measure-format.pipe.mjs +36 -36
- package/esm2020/lib/measure/measurer/measurer-dialog.component.mjs +179 -179
- package/esm2020/lib/measure/measurer/measurer-item.component.mjs +139 -139
- package/esm2020/lib/measure/measurer/measurer.component.mjs +1041 -1041
- package/esm2020/lib/measure/measurer/measurer.module.mjs +93 -93
- package/esm2020/lib/measure/shared/index.mjs +4 -4
- package/esm2020/lib/measure/shared/measure.enum.mjs +36 -36
- package/esm2020/lib/measure/shared/measure.interfaces.mjs +1 -1
- package/esm2020/lib/measure/shared/measure.utils.mjs +488 -488
- package/esm2020/lib/metadata/index.mjs +2 -2
- package/esm2020/lib/metadata/metadata-button/index.mjs +2 -2
- package/esm2020/lib/metadata/metadata-button/metadata-button.component.mjs +134 -134
- package/esm2020/lib/metadata/metadata.module.mjs +54 -54
- package/esm2020/lib/metadata/shared/index.mjs +3 -3
- package/esm2020/lib/metadata/shared/metadata.interface.mjs +1 -1
- package/esm2020/lib/metadata/shared/metadata.service.mjs +19 -19
- package/esm2020/lib/offline/geoDB/configFileToGeoDB.service.mjs +104 -104
- package/esm2020/lib/offline/geoDB/geoDB.enums.mjs +5 -5
- package/esm2020/lib/offline/geoDB/geoDB.interface.mjs +1 -1
- package/esm2020/lib/offline/geoDB/geoDB.service.mjs +166 -166
- package/esm2020/lib/offline/geoDB/index.mjs +5 -5
- package/esm2020/lib/offline/index.mjs +2 -2
- package/esm2020/lib/offline/shared/geo-network.service.mjs +65 -65
- package/esm2020/lib/offline/shared/index.mjs +2 -2
- package/esm2020/lib/overlay/index.mjs +2 -2
- package/esm2020/lib/overlay/overlay.module.mjs +22 -22
- package/esm2020/lib/overlay/shared/index.mjs +6 -6
- package/esm2020/lib/overlay/shared/overlay-marker-style.utils.mjs +68 -68
- package/esm2020/lib/overlay/shared/overlay.directive.mjs +32 -32
- package/esm2020/lib/overlay/shared/overlay.enum.mjs +7 -7
- package/esm2020/lib/overlay/shared/overlay.mjs +129 -129
- package/esm2020/lib/overlay/shared/overlay.service.mjs +26 -26
- package/esm2020/lib/overlay/shared/overlay.utils.mjs +102 -102
- package/esm2020/lib/print/index.mjs +4 -4
- package/esm2020/lib/print/print/print.component.mjs +125 -125
- package/esm2020/lib/print/print-form/index.mjs +2 -2
- package/esm2020/lib/print/print-form/print-form.component.mjs +427 -427
- package/esm2020/lib/print/print.module.mjs +64 -64
- package/esm2020/lib/print/shared/geopdf.mjs +57 -57
- package/esm2020/lib/print/shared/index.mjs +5 -5
- package/esm2020/lib/print/shared/print.interface.mjs +1 -1
- package/esm2020/lib/print/shared/print.service.mjs +933 -933
- package/esm2020/lib/print/shared/print.type.mjs +29 -29
- package/esm2020/lib/query/index.mjs +2 -2
- package/esm2020/lib/query/query.module.mjs +28 -28
- package/esm2020/lib/query/shared/index.mjs +7 -7
- package/esm2020/lib/query/shared/query-search-source.mjs +34 -34
- package/esm2020/lib/query/shared/query-search-source.providers.mjs +21 -21
- package/esm2020/lib/query/shared/query.directive.mjs +260 -260
- package/esm2020/lib/query/shared/query.enums.mjs +30 -30
- package/esm2020/lib/query/shared/query.interfaces.mjs +1 -1
- package/esm2020/lib/query/shared/query.service.mjs +732 -732
- package/esm2020/lib/query/shared/query.utils.mjs +36 -36
- package/esm2020/lib/search/index.mjs +11 -11
- package/esm2020/lib/search/search-bar/search-bar.component.mjs +511 -511
- package/esm2020/lib/search/search-bar/search-bar.module.mjs +74 -74
- package/esm2020/lib/search/search-bar/search-url-param.directive.mjs +34 -34
- package/esm2020/lib/search/search-results/save-feature-dialog.component.mjs +117 -117
- package/esm2020/lib/search/search-results/search-results-add-button.component.mjs +370 -370
- package/esm2020/lib/search/search-results/search-results-item.component.mjs +123 -123
- package/esm2020/lib/search/search-results/search-results.component.mjs +339 -339
- package/esm2020/lib/search/search-results/search-results.module.mjs +103 -103
- package/esm2020/lib/search/search-selector/search-selector.component.mjs +122 -122
- package/esm2020/lib/search/search-selector/search-selector.module.mjs +55 -55
- package/esm2020/lib/search/search-settings/search-settings.component.mjs +441 -441
- package/esm2020/lib/search/search-settings/search-settings.module.mjs +59 -59
- package/esm2020/lib/search/search.module.mjs +66 -66
- package/esm2020/lib/search/shared/index.mjs +9 -9
- package/esm2020/lib/search/shared/search-pointer-summary.directive.mjs +321 -321
- package/esm2020/lib/search/shared/search-source-service.providers.mjs +19 -19
- package/esm2020/lib/search/shared/search-source.service.mjs +46 -46
- package/esm2020/lib/search/shared/search.enums.mjs +3 -3
- package/esm2020/lib/search/shared/search.interfaces.mjs +1 -1
- package/esm2020/lib/search/shared/search.service.mjs +120 -120
- package/esm2020/lib/search/shared/search.utils.mjs +90 -90
- package/esm2020/lib/search/shared/sources/coordinates.interfaces.mjs +1 -1
- package/esm2020/lib/search/shared/sources/coordinates.mjs +153 -153
- package/esm2020/lib/search/shared/sources/coordinates.providers.mjs +39 -39
- package/esm2020/lib/search/shared/sources/icherche.interfaces.mjs +1 -1
- package/esm2020/lib/search/shared/sources/icherche.mjs +767 -767
- package/esm2020/lib/search/shared/sources/icherche.providers.mjs +65 -65
- package/esm2020/lib/search/shared/sources/ilayer.interfaces.mjs +1 -1
- package/esm2020/lib/search/shared/sources/ilayer.mjs +320 -320
- package/esm2020/lib/search/shared/sources/ilayer.providers.mjs +39 -39
- package/esm2020/lib/search/shared/sources/index.mjs +17 -17
- package/esm2020/lib/search/shared/sources/nominatim.interfaces.mjs +2 -2
- package/esm2020/lib/search/shared/sources/nominatim.mjs +252 -252
- package/esm2020/lib/search/shared/sources/nominatim.providers.mjs +22 -22
- package/esm2020/lib/search/shared/sources/source.interfaces.mjs +1 -1
- package/esm2020/lib/search/shared/sources/source.mjs +178 -178
- package/esm2020/lib/search/shared/sources/storedqueries.interfaces.mjs +1 -1
- package/esm2020/lib/search/shared/sources/storedqueries.mjs +425 -425
- package/esm2020/lib/search/shared/sources/storedqueries.providers.mjs +40 -40
- package/esm2020/lib/toast/index.mjs +2 -2
- package/esm2020/lib/toast/toast.component.mjs +112 -112
- package/esm2020/lib/toast/toast.module.mjs +44 -44
- package/esm2020/lib/utils/commonVectorStyle.interface.mjs +1 -1
- package/esm2020/lib/utils/commonVectorStyle.mjs +74 -74
- package/esm2020/lib/utils/googleLinks.mjs +12 -12
- package/esm2020/lib/utils/id-generator.mjs +109 -109
- package/esm2020/lib/utils/index.mjs +5 -5
- package/esm2020/lib/utils/osmLinks.mjs +9 -9
- package/esm2020/lib/wkt/index.mjs +2 -2
- package/esm2020/lib/wkt/shared/index.mjs +2 -2
- package/esm2020/lib/wkt/shared/wkt.service.mjs +224 -224
- package/esm2020/lib/wkt/wkt.module.mjs +21 -21
- package/esm2020/lib/workspace/confirmation-popup/confirmation-popup.component.mjs +47 -47
- package/esm2020/lib/workspace/confirmation-popup/confirmation-popup.module.mjs +35 -35
- package/esm2020/lib/workspace/confirmation-popup/index.mjs +2 -2
- package/esm2020/lib/workspace/index.mjs +8 -8
- package/esm2020/lib/workspace/shared/edition-workspace.mjs +279 -279
- package/esm2020/lib/workspace/shared/edition-workspace.service.mjs +656 -656
- package/esm2020/lib/workspace/shared/feature-workspace.mjs +34 -34
- package/esm2020/lib/workspace/shared/feature-workspace.service.mjs +149 -149
- package/esm2020/lib/workspace/shared/index.mjs +8 -8
- package/esm2020/lib/workspace/shared/wfs-workspace.mjs +34 -34
- package/esm2020/lib/workspace/shared/wfs-workspace.service.mjs +149 -149
- package/esm2020/lib/workspace/shared/wms-workspace.service.mjs +259 -259
- package/esm2020/lib/workspace/shared/workspace.utils.mjs +23 -23
- package/esm2020/lib/workspace/widgets/index.mjs +4 -4
- package/esm2020/lib/workspace/widgets/ogc-filter/ogc-filter.component.mjs +46 -46
- package/esm2020/lib/workspace/widgets/ogc-filter/ogc-filter.module.mjs +35 -35
- package/esm2020/lib/workspace/widgets/widgets.mjs +15 -15
- package/esm2020/lib/workspace/workspace-selector/workspace-selector.directive.mjs +132 -132
- package/esm2020/lib/workspace/workspace-selector/workspace-selector.module.mjs +27 -27
- package/esm2020/lib/workspace/workspace-updator/workspace-updator.directive.mjs +112 -112
- package/esm2020/lib/workspace/workspace-updator/workspace-updator.module.mjs +27 -27
- package/esm2020/lib/workspace/workspace.module.mjs +61 -61
- package/esm2020/public_api.mjs +54 -54
- package/fesm2015/igo2-geo.mjs +44992 -44987
- package/fesm2015/igo2-geo.mjs.map +1 -1
- package/fesm2020/igo2-geo.mjs +43034 -43029
- package/fesm2020/igo2-geo.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/catalog/catalog-browser/catalog-browser-group.component.d.ts +126 -126
- package/lib/catalog/catalog-browser/catalog-browser-layer.component.d.ts +80 -80
- package/lib/catalog/catalog-browser/catalog-browser.component.d.ts +105 -105
- package/lib/catalog/catalog-browser/catalog-browser.module.d.ts +22 -22
- package/lib/catalog/catalog-library/add-catalog-dialog.component.d.ts +45 -45
- package/lib/catalog/catalog-library/catalog-library-item.component.d.ts +25 -25
- package/lib/catalog/catalog-library/catalog-library.component.d.ts +65 -65
- package/lib/catalog/catalog-library/catalog-library.module.d.ts +26 -26
- package/lib/catalog/catalog.module.d.ts +14 -14
- package/lib/catalog/index.d.ts +4 -4
- package/lib/catalog/shared/catalog.abstract.d.ts +50 -50
- package/lib/catalog/shared/catalog.enum.d.ts +14 -14
- package/lib/catalog/shared/catalog.interface.d.ts +66 -66
- package/lib/catalog/shared/catalog.service.d.ts +36 -36
- package/lib/catalog/shared/index.d.ts +4 -4
- package/lib/datasource/datasource.module.d.ts +8 -8
- package/lib/datasource/index.d.ts +2 -2
- package/lib/datasource/shared/capabilities.service.d.ts +37 -37
- package/lib/datasource/shared/datasource.service.d.ts +37 -37
- package/lib/datasource/shared/datasources/any-datasource.d.ts +16 -16
- package/lib/datasource/shared/datasources/any-datasource.interface.d.ts +15 -15
- package/lib/datasource/shared/datasources/arcgisrest-datasource.d.ts +14 -14
- package/lib/datasource/shared/datasources/arcgisrest-datasource.interface.d.ts +14 -14
- package/lib/datasource/shared/datasources/carto-datasource.d.ts +15 -15
- package/lib/datasource/shared/datasources/carto-datasource.interface.d.ts +13 -13
- package/lib/datasource/shared/datasources/cluster-datasource.d.ts +10 -10
- package/lib/datasource/shared/datasources/cluster-datasource.interface.d.ts +11 -11
- package/lib/datasource/shared/datasources/data.service.d.ts +3 -3
- package/lib/datasource/shared/datasources/datasource.d.ts +20 -20
- package/lib/datasource/shared/datasources/datasource.interface.d.ts +100 -100
- package/lib/datasource/shared/datasources/feature-datasource.d.ts +12 -12
- package/lib/datasource/shared/datasources/feature-datasource.interface.d.ts +18 -18
- package/lib/datasource/shared/datasources/imagearcgisrest-datasource.d.ts +15 -15
- package/lib/datasource/shared/datasources/imagearcgisrest-datasource.interface.d.ts +15 -15
- package/lib/datasource/shared/datasources/index.d.ts +35 -35
- package/lib/datasource/shared/datasources/mvt-datasource.d.ts +10 -10
- package/lib/datasource/shared/datasources/mvt-datasource.interface.d.ts +13 -13
- package/lib/datasource/shared/datasources/osm-datasource.d.ts +9 -9
- package/lib/datasource/shared/datasources/osm-datasource.interface.d.ts +7 -7
- package/lib/datasource/shared/datasources/tilearcgisrest-datasource.d.ts +15 -15
- package/lib/datasource/shared/datasources/tilearcgisrest-datasource.interface.d.ts +14 -14
- package/lib/datasource/shared/datasources/tiledebug-datasource.d.ts +9 -9
- package/lib/datasource/shared/datasources/tiledebug-datasource.interface.d.ts +9 -9
- package/lib/datasource/shared/datasources/websocket-datasource.d.ts +15 -15
- package/lib/datasource/shared/datasources/websocket-datasource.interface.d.ts +7 -7
- package/lib/datasource/shared/datasources/wfs-datasource.d.ts +20 -20
- package/lib/datasource/shared/datasources/wfs-datasource.interface.d.ts +20 -20
- package/lib/datasource/shared/datasources/wfs.service.d.ts +17 -17
- package/lib/datasource/shared/datasources/wms-datasource.d.ts +31 -31
- package/lib/datasource/shared/datasources/wms-datasource.interface.d.ts +32 -32
- package/lib/datasource/shared/datasources/wms-wfs.utils.d.ts +41 -41
- package/lib/datasource/shared/datasources/wmts-datasource.d.ts +10 -10
- package/lib/datasource/shared/datasources/wmts-datasource.interface.d.ts +13 -13
- package/lib/datasource/shared/datasources/xyz-datasource.d.ts +9 -9
- package/lib/datasource/shared/datasources/xyz-datasource.interface.d.ts +11 -11
- package/lib/datasource/shared/index.d.ts +4 -4
- package/lib/datasource/shared/options/index.d.ts +4 -4
- package/lib/datasource/shared/options/options-api.interface.d.ts +4 -4
- package/lib/datasource/shared/options/options-api.providers.d.ts +10 -10
- package/lib/datasource/shared/options/options-api.service.d.ts +16 -16
- package/lib/datasource/shared/options/options.service.d.ts +6 -6
- package/lib/datasource/utils/esri-style-generator.d.ts +21 -21
- package/lib/datasource/utils/index.d.ts +2 -2
- package/lib/datasource/utils/tilegrid.d.ts +2 -2
- package/lib/directions/directions-buttons/directions-buttons.component.d.ts +30 -30
- package/lib/directions/directions-buttons/index.d.ts +1 -1
- package/lib/directions/directions-inputs/directions-inputs.component.d.ts +45 -45
- package/lib/directions/directions-inputs/index.d.ts +1 -1
- package/lib/directions/directions-results/directions-results.component.d.ts +30 -30
- package/lib/directions/directions-results/index.d.ts +1 -1
- package/lib/directions/directions-sources/directions-source.d.ts +7 -7
- package/lib/directions/directions-sources/directions-source.interface.d.ts +11 -11
- package/lib/directions/directions-sources/directions-source.provider.d.ts +11 -11
- package/lib/directions/directions-sources/index.d.ts +4 -4
- package/lib/directions/directions-sources/osrm-directions-source.d.ts +23 -23
- package/lib/directions/directions.component.d.ts +56 -56
- package/lib/directions/directions.module.d.ts +26 -26
- package/lib/directions/index.d.ts +6 -6
- package/lib/directions/shared/directions-source.service.d.ts +11 -11
- package/lib/directions/shared/directions.enum.d.ts +22 -22
- package/lib/directions/shared/directions.interface.d.ts +126 -126
- package/lib/directions/shared/directions.service.d.ts +13 -13
- package/lib/directions/shared/directions.utils.d.ts +42 -42
- package/lib/directions/shared/index.d.ts +5 -5
- package/lib/directions/shared/store.d.ts +18 -18
- package/lib/download/download-button/download-button.component.d.ts +18 -18
- package/lib/download/download-button/index.d.ts +1 -1
- package/lib/download/download.module.d.ts +14 -14
- package/lib/download/index.d.ts +2 -2
- package/lib/download/shared/download.interface.d.ts +10 -10
- package/lib/download/shared/download.service.d.ts +11 -11
- package/lib/download/shared/index.d.ts +2 -2
- package/lib/draw/draw/draw-layer-popup.component.d.ts +14 -14
- package/lib/draw/draw/draw-popup.component.d.ts +63 -63
- package/lib/draw/draw/draw-shorcuts.component.d.ts +5 -5
- package/lib/draw/draw/draw.component.d.ts +239 -239
- package/lib/draw/draw/draw.module.d.ts +34 -34
- package/lib/draw/drawingTool.module.d.ts +7 -7
- package/lib/draw/index.d.ts +2 -2
- package/lib/draw/shared/draw-icon.service.d.ts +12 -12
- package/lib/draw/shared/draw-style.service.d.ts +36 -36
- package/lib/draw/shared/draw.enum.d.ts +32 -32
- package/lib/draw/shared/draw.interface.d.ts +40 -40
- package/lib/draw/shared/draw.utils.d.ts +35 -35
- package/lib/draw/shared/index.d.ts +5 -5
- package/lib/feature/feature-details/feature-details.component.d.ts +60 -60
- package/lib/feature/feature-details/feature-details.directive.d.ts +19 -19
- package/lib/feature/feature-details/feature-details.module.d.ts +15 -15
- package/lib/feature/feature-form/feature-form.component.d.ts +50 -50
- package/lib/feature/feature-form/feature-form.module.d.ts +12 -12
- package/lib/feature/feature.module.d.ts +9 -9
- package/lib/feature/index.d.ts +3 -3
- package/lib/feature/shared/feature.enums.d.ts +7 -7
- package/lib/feature/shared/feature.interfaces.d.ts +74 -74
- package/lib/feature/shared/feature.utils.d.ts +104 -104
- package/lib/feature/shared/index.d.ts +6 -6
- package/lib/feature/shared/store.d.ts +71 -71
- package/lib/feature/shared/strategies/in-map-extent.d.ts +52 -52
- package/lib/feature/shared/strategies/in-map-resolution.d.ts +52 -52
- package/lib/feature/shared/strategies/index.d.ts +5 -5
- package/lib/feature/shared/strategies/loading-layer.d.ts +59 -59
- package/lib/feature/shared/strategies/loading.d.ts +75 -75
- package/lib/feature/shared/strategies/selection.d.ts +176 -176
- package/lib/feature/shared/strategies.utils.d.ts +17 -17
- package/lib/filter/filter.module.d.ts +53 -53
- package/lib/filter/index.d.ts +15 -15
- package/lib/filter/ogc-filter-button/index.d.ts +1 -1
- package/lib/filter/ogc-filter-button/ogc-filter-button.component.d.ts +20 -20
- package/lib/filter/ogc-filter-form/index.d.ts +1 -1
- package/lib/filter/ogc-filter-form/ogc-filter-form.component.d.ts +65 -65
- package/lib/filter/ogc-filter-selection/index.d.ts +1 -1
- package/lib/filter/ogc-filter-selection/ogc-filter-selection.component.d.ts +93 -93
- package/lib/filter/ogc-filter-time/index.d.ts +2 -2
- package/lib/filter/ogc-filter-time/ogc-filter-time-slider.component.d.ts +39 -39
- package/lib/filter/ogc-filter-time/ogc-filter-time.component.d.ts +86 -86
- package/lib/filter/ogc-filterable-form/index.d.ts +1 -1
- package/lib/filter/ogc-filterable-form/ogc-filterable-form.component.d.ts +15 -15
- package/lib/filter/ogc-filterable-item/index.d.ts +1 -1
- package/lib/filter/ogc-filterable-item/ogc-filterable-item.component.d.ts +41 -41
- package/lib/filter/ogc-filterable-list/index.d.ts +2 -2
- package/lib/filter/ogc-filterable-list/ogc-filterable-list-binding.directive.d.ts +14 -14
- package/lib/filter/ogc-filterable-list/ogc-filterable-list.component.d.ts +10 -10
- package/lib/filter/shared/filterable-datasource.pipe.d.ts +10 -10
- package/lib/filter/shared/index.d.ts +11 -11
- package/lib/filter/shared/ogc-filter-time.service.d.ts +19 -19
- package/lib/filter/shared/ogc-filter.d.ts +29 -29
- package/lib/filter/shared/ogc-filter.enum.d.ts +27 -27
- package/lib/filter/shared/ogc-filter.interface.d.ts +200 -200
- package/lib/filter/shared/ogc-filter.service.d.ts +11 -11
- package/lib/filter/shared/spatial-filter.enum.d.ts +19 -19
- package/lib/filter/shared/spatial-filter.interface.d.ts +10 -10
- package/lib/filter/shared/spatial-filter.service.d.ts +37 -37
- package/lib/filter/shared/time-filter.enum.d.ts +10 -10
- package/lib/filter/shared/time-filter.interface.d.ts +29 -29
- package/lib/filter/shared/time-filter.service.d.ts +11 -11
- package/lib/filter/spatial-filter/spatial-filter-item/index.d.ts +1 -1
- package/lib/filter/spatial-filter/spatial-filter-item/spatial-filter-item.component.d.ts +166 -166
- package/lib/filter/spatial-filter/spatial-filter-list/index.d.ts +1 -1
- package/lib/filter/spatial-filter/spatial-filter-list/spatial-filter-list.component.d.ts +58 -58
- package/lib/filter/spatial-filter/spatial-filter-type/index.d.ts +1 -1
- package/lib/filter/spatial-filter/spatial-filter-type/spatial-filter-type.component.d.ts +45 -45
- package/lib/filter/time-filter-button/index.d.ts +1 -1
- package/lib/filter/time-filter-button/time-filter-button.component.d.ts +20 -20
- package/lib/filter/time-filter-form/index.d.ts +1 -1
- package/lib/filter/time-filter-form/time-filter-form.component.d.ts +77 -77
- package/lib/filter/time-filter-item/index.d.ts +1 -1
- package/lib/filter/time-filter-item/time-filter-item.component.d.ts +28 -28
- package/lib/filter/time-filter-list/index.d.ts +2 -2
- package/lib/filter/time-filter-list/time-filter-list-binding.directive.d.ts +14 -14
- package/lib/filter/time-filter-list/time-filter-list.component.d.ts +12 -12
- package/lib/geo.module.d.ts +28 -28
- package/lib/geometry/geometry-form-field/geometry-form-field-input.component.d.ts +206 -206
- package/lib/geometry/geometry-form-field/geometry-form-field.component.d.ts +88 -88
- package/lib/geometry/geometry-form-field/geometry-form-field.module.d.ts +19 -19
- package/lib/geometry/geometry.module.d.ts +8 -8
- package/lib/geometry/index.d.ts +3 -3
- package/lib/geometry/shared/controls/draw.d.ts +150 -150
- package/lib/geometry/shared/controls/index.d.ts +3 -3
- package/lib/geometry/shared/controls/modify.d.ts +228 -228
- package/lib/geometry/shared/controls/slice.d.ts +99 -99
- package/lib/geometry/shared/geometry.errors.d.ts +11 -11
- package/lib/geometry/shared/geometry.interfaces.d.ts +13 -13
- package/lib/geometry/shared/geometry.utils.d.ts +45 -45
- package/lib/geometry/shared/index.d.ts +4 -4
- package/lib/import-export/export-button/export-button.component.d.ts +16 -16
- package/lib/import-export/export-button/index.d.ts +1 -1
- package/lib/import-export/import-export/import-export.component.d.ts +104 -104
- package/lib/import-export/import-export/index.d.ts +1 -1
- package/lib/import-export/import-export.module.d.ts +26 -26
- package/lib/import-export/index.d.ts +4 -4
- package/lib/import-export/shared/drop-geo-file.directive.d.ts +36 -36
- package/lib/import-export/shared/export.errors.d.ts +8 -8
- package/lib/import-export/shared/export.interface.d.ts +11 -11
- package/lib/import-export/shared/export.service.d.ts +30 -30
- package/lib/import-export/shared/export.type.d.ts +16 -16
- package/lib/import-export/shared/export.utils.d.ts +19 -19
- package/lib/import-export/shared/import.errors.d.ts +20 -20
- package/lib/import-export/shared/import.interface.d.ts +8 -8
- package/lib/import-export/shared/import.service.d.ts +31 -31
- package/lib/import-export/shared/import.utils.d.ts +18 -18
- package/lib/import-export/shared/index.d.ts +10 -10
- package/lib/import-export/style-list/index.d.ts +4 -4
- package/lib/import-export/style-list/style-list.interface.d.ts +6 -6
- package/lib/import-export/style-list/style-list.module.d.ts +8 -8
- package/lib/import-export/style-list/style-list.provider.d.ts +15 -15
- package/lib/import-export/style-list/style-list.service.d.ts +18 -18
- package/lib/layer/index.d.ts +10 -10
- package/lib/layer/layer-item/index.d.ts +1 -1
- package/lib/layer/layer-item/layer-item.component.d.ts +62 -62
- package/lib/layer/layer-legend/index.d.ts +1 -1
- package/lib/layer/layer-legend/layer-legend.component.d.ts +90 -90
- package/lib/layer/layer-legend-item/index.d.ts +1 -1
- package/lib/layer/layer-legend-item/layer-legend-item.component.d.ts +22 -22
- package/lib/layer/layer-legend-list/index.d.ts +2 -2
- package/lib/layer/layer-legend-list/layer-legend-list-binding.directive.d.ts +16 -16
- package/lib/layer/layer-legend-list/layer-legend-list.component.d.ts +31 -31
- package/lib/layer/layer-list/index.d.ts +3 -3
- package/lib/layer/layer-list/layer-list-binding.directive.d.ts +19 -19
- package/lib/layer/layer-list/layer-list.component.d.ts +127 -127
- package/lib/layer/layer-list/layer-list.enum.d.ts +15 -15
- package/lib/layer/layer-list-tool/index.d.ts +4 -4
- package/lib/layer/layer-list-tool/layer-list-tool.component.d.ts +32 -32
- package/lib/layer/layer-list-tool/layer-list-tool.enum.d.ts +5 -5
- package/lib/layer/layer-list-tool/layer-list-tool.interface.d.ts +8 -8
- package/lib/layer/layer-list-tool/layer-list-tool.service.d.ts +14 -14
- package/lib/layer/layer.module.d.ts +36 -36
- package/lib/layer/shared/clusterParam.d.ts +13 -13
- package/lib/layer/shared/index.d.ts +6 -6
- package/lib/layer/shared/layer.enums.d.ts +1 -1
- package/lib/layer/shared/layer.service.d.ts +30 -30
- package/lib/layer/shared/layers/any-layer.d.ts +6 -6
- package/lib/layer/shared/layers/any-layer.interface.d.ts +6 -6
- package/lib/layer/shared/layers/image-layer.d.ts +22 -22
- package/lib/layer/shared/layers/image-layer.interface.d.ts +19 -19
- package/lib/layer/shared/layers/index.d.ts +12 -12
- package/lib/layer/shared/layers/layer.d.ts +62 -62
- package/lib/layer/shared/layers/layer.interface.d.ts +109 -109
- package/lib/layer/shared/layers/tile-layer.d.ts +31 -31
- package/lib/layer/shared/layers/tile-layer.interface.d.ts +20 -20
- package/lib/layer/shared/layers/vector-layer.d.ts +78 -78
- package/lib/layer/shared/layers/vector-layer.interface.d.ts +41 -41
- package/lib/layer/shared/layers/vectortile-layer.d.ts +28 -28
- package/lib/layer/shared/layers/vectortile-layer.interface.d.ts +18 -18
- package/lib/layer/shared/style.service.d.ts +57 -57
- package/lib/layer/shared/vector-style.interface.d.ts +38 -38
- package/lib/layer/style-modal/index.d.ts +1 -1
- package/lib/layer/style-modal/style-modal.component.d.ts +42 -42
- package/lib/layer/track-feature-button/index.d.ts +1 -1
- package/lib/layer/track-feature-button/track-feature-button.component.d.ts +15 -15
- package/lib/layer/utils/image-watcher.d.ts +17 -17
- package/lib/layer/utils/index.d.ts +5 -5
- package/lib/layer/utils/layer.utils.d.ts +2 -2
- package/lib/layer/utils/outputLegend.d.ts +7 -7
- package/lib/layer/utils/tile-watcher.d.ts +14 -14
- package/lib/layer/utils/vector-watcher.d.ts +13 -13
- package/lib/map/baselayers-switcher/baselayers-switcher.animation.d.ts +2 -2
- package/lib/map/baselayers-switcher/baselayers-switcher.component.d.ts +21 -21
- package/lib/map/baselayers-switcher/index.d.ts +2 -2
- package/lib/map/baselayers-switcher/mini-basemap.component.d.ts +29 -29
- package/lib/map/geolocate-button/geolocate-button.component.d.ts +22 -22
- package/lib/map/geolocate-button/index.d.ts +1 -1
- package/lib/map/home-extent-button/home-extent-button.component.d.ts +20 -20
- package/lib/map/home-extent-button/index.d.ts +1 -1
- package/lib/map/index.d.ts +13 -13
- package/lib/map/info-section/index.d.ts +1 -1
- package/lib/map/info-section/info-section.component.d.ts +7 -7
- package/lib/map/map-browser/index.d.ts +1 -1
- package/lib/map/map-browser/map-browser.component.d.ts +25 -25
- package/lib/map/map-center/index.d.ts +1 -1
- package/lib/map/map-center/map-center.component.d.ts +31 -31
- package/lib/map/map.module.d.ts +28 -28
- package/lib/map/menu-button/index.d.ts +1 -1
- package/lib/map/menu-button/menu-button.component.d.ts +17 -17
- package/lib/map/offline-button/index.d.ts +1 -1
- package/lib/map/offline-button/offline-button.component.d.ts +23 -23
- package/lib/map/rotation-button/index.d.ts +1 -1
- package/lib/map/rotation-button/rotation-button.component.d.ts +17 -17
- package/lib/map/shared/controllers/controller.d.ts +29 -29
- package/lib/map/shared/controllers/geolocation.d.ts +112 -112
- package/lib/map/shared/controllers/index.d.ts +3 -3
- package/lib/map/shared/controllers/view.d.ts +200 -200
- package/lib/map/shared/hover-feature.directive.d.ts +132 -132
- package/lib/map/shared/index.d.ts +13 -13
- package/lib/map/shared/linkedLayers.utils.d.ts +17 -17
- package/lib/map/shared/map-pointer-position.directive.d.ts +71 -71
- package/lib/map/shared/map.d.ts +135 -135
- package/lib/map/shared/map.enums.d.ts +4 -4
- package/lib/map/shared/map.interface.d.ts +57 -57
- package/lib/map/shared/map.service.d.ts +19 -19
- package/lib/map/shared/map.utils.d.ts +90 -90
- package/lib/map/shared/mapOffline.directive.d.ts +21 -21
- package/lib/map/shared/projection.interfaces.d.ts +29 -29
- package/lib/map/shared/projection.service.d.ts +19 -19
- package/lib/map/shared/projection.utils.d.ts +19 -19
- package/lib/map/swipe-control/index.d.ts +1 -1
- package/lib/map/swipe-control/swipe-control.component.d.ts +97 -97
- package/lib/map/utils/layer-watcher.d.ts +20 -20
- package/lib/map/wake-lock-button/index.d.ts +1 -1
- package/lib/map/wake-lock-button/wake-lock-button.component.d.ts +30 -30
- package/lib/map/zoom-button/index.d.ts +1 -1
- package/lib/map/zoom-button/zoom-button.component.d.ts +12 -12
- package/lib/measure/index.d.ts +3 -3
- package/lib/measure/measure.module.d.ts +7 -7
- package/lib/measure/measurer/measure-format.pipe.d.ts +15 -15
- package/lib/measure/measurer/measurer-dialog.component.d.ts +14 -14
- package/lib/measure/measurer/measurer-item.component.d.ts +66 -66
- package/lib/measure/measurer/measurer.component.d.ts +405 -405
- package/lib/measure/measurer/measurer.module.d.ts +25 -25
- package/lib/measure/shared/index.d.ts +3 -3
- package/lib/measure/shared/measure.enum.d.ts +33 -33
- package/lib/measure/shared/measure.interfaces.d.ts +21 -21
- package/lib/measure/shared/measure.utils.d.ts +180 -180
- package/lib/metadata/index.d.ts +2 -2
- package/lib/metadata/metadata-button/index.d.ts +1 -1
- package/lib/metadata/metadata-button/metadata-button.component.d.ts +26 -26
- package/lib/metadata/metadata.module.d.ts +15 -15
- package/lib/metadata/shared/index.d.ts +2 -2
- package/lib/metadata/shared/metadata.interface.d.ts +13 -13
- package/lib/metadata/shared/metadata.service.d.ts +8 -8
- package/lib/offline/geoDB/configFileToGeoDB.service.d.ts +14 -14
- package/lib/offline/geoDB/geoDB.enums.d.ts +4 -4
- package/lib/offline/geoDB/geoDB.interface.d.ts +19 -19
- package/lib/offline/geoDB/geoDB.service.d.ts +37 -37
- package/lib/offline/geoDB/index.d.ts +4 -4
- package/lib/offline/index.d.ts +2 -2
- package/lib/offline/shared/geo-network.service.d.ts +28 -28
- package/lib/offline/shared/index.d.ts +1 -1
- package/lib/overlay/index.d.ts +1 -1
- package/lib/overlay/overlay.module.d.ts +9 -9
- package/lib/overlay/shared/index.d.ts +6 -6
- package/lib/overlay/shared/overlay-marker-style.utils.d.ts +11 -11
- package/lib/overlay/shared/overlay.d.ts +81 -81
- package/lib/overlay/shared/overlay.directive.d.ts +18 -18
- package/lib/overlay/shared/overlay.enum.d.ts +6 -6
- package/lib/overlay/shared/overlay.service.d.ts +14 -14
- package/lib/overlay/shared/overlay.utils.d.ts +17 -17
- package/lib/print/index.d.ts +3 -3
- package/lib/print/print/print.component.d.ts +35 -35
- package/lib/print/print-form/index.d.ts +1 -1
- package/lib/print/print-form/print-form.component.d.ts +97 -97
- package/lib/print/print.module.d.ts +19 -19
- package/lib/print/shared/geopdf.d.ts +1 -1
- package/lib/print/shared/index.d.ts +4 -4
- package/lib/print/shared/print.interface.d.ts +22 -22
- package/lib/print/shared/print.service.d.ts +168 -168
- package/lib/print/shared/print.type.d.ts +45 -45
- package/lib/query/index.d.ts +1 -1
- package/lib/query/query.module.d.ts +11 -11
- package/lib/query/shared/index.d.ts +6 -6
- package/lib/query/shared/query-search-source.d.ts +17 -17
- package/lib/query/shared/query-search-source.providers.d.ts +17 -17
- package/lib/query/shared/query.directive.d.ts +105 -105
- package/lib/query/shared/query.enums.d.ts +26 -26
- package/lib/query/shared/query.interfaces.d.ts +35 -35
- package/lib/query/shared/query.service.d.ts +56 -56
- package/lib/query/shared/query.utils.d.ts +27 -27
- package/lib/search/index.d.ts +11 -11
- package/lib/search/search-bar/search-bar.component.d.ts +230 -230
- package/lib/search/search-bar/search-bar.module.d.ts +23 -23
- package/lib/search/search-bar/search-url-param.directive.d.ts +13 -13
- package/lib/search/search-results/save-feature-dialog.component.d.ts +32 -32
- package/lib/search/search-results/search-results-add-button.component.d.ts +76 -76
- package/lib/search/search-results/search-results-item.component.d.ts +47 -47
- package/lib/search/search-results/search-results.component.d.ts +161 -161
- package/lib/search/search-results/search-results.module.d.ts +28 -28
- package/lib/search/search-selector/search-selector.component.d.ts +58 -58
- package/lib/search/search-selector/search-selector.module.d.ts +19 -19
- package/lib/search/search-settings/search-settings.component.d.ts +102 -102
- package/lib/search/search-settings/search-settings.module.d.ts +20 -20
- package/lib/search/search.module.d.ts +14 -14
- package/lib/search/shared/index.d.ts +8 -8
- package/lib/search/shared/search-pointer-summary.directive.d.ts +133 -133
- package/lib/search/shared/search-source-service.providers.d.ts +15 -15
- package/lib/search/shared/search-source.service.d.ts +32 -32
- package/lib/search/shared/search.enums.d.ts +1 -1
- package/lib/search/shared/search.interfaces.d.ts +29 -29
- package/lib/search/shared/search.service.d.ts +53 -53
- package/lib/search/shared/search.utils.d.ts +39 -39
- package/lib/search/shared/sources/coordinates.d.ts +40 -40
- package/lib/search/shared/sources/coordinates.interfaces.d.ts +12 -12
- package/lib/search/shared/sources/coordinates.providers.d.ts +31 -31
- package/lib/search/shared/sources/icherche.d.ts +96 -96
- package/lib/search/shared/sources/icherche.interfaces.d.ts +30 -30
- package/lib/search/shared/sources/icherche.providers.d.ts +46 -46
- package/lib/search/shared/sources/ilayer.d.ts +55 -55
- package/lib/search/shared/sources/ilayer.interfaces.d.ts +47 -47
- package/lib/search/shared/sources/ilayer.providers.d.ts +31 -31
- package/lib/search/shared/sources/index.d.ts +17 -17
- package/lib/search/shared/sources/nominatim.d.ts +45 -45
- package/lib/search/shared/sources/nominatim.interfaces.d.ts +10 -10
- package/lib/search/shared/sources/nominatim.providers.d.ts +18 -18
- package/lib/search/shared/sources/source.d.ts +108 -108
- package/lib/search/shared/sources/source.interfaces.d.ts +47 -47
- package/lib/search/shared/sources/storedqueries.d.ts +73 -73
- package/lib/search/shared/sources/storedqueries.interfaces.d.ts +42 -42
- package/lib/search/shared/sources/storedqueries.providers.d.ts +32 -32
- package/lib/toast/index.d.ts +1 -1
- package/lib/toast/toast.component.d.ts +33 -33
- package/lib/toast/toast.module.d.ts +14 -14
- package/lib/utils/commonVectorStyle.d.ts +14 -14
- package/lib/utils/commonVectorStyle.interface.d.ts +16 -16
- package/lib/utils/googleLinks.d.ts +5 -5
- package/lib/utils/id-generator.d.ts +54 -54
- package/lib/utils/index.d.ts +5 -5
- package/lib/utils/osmLinks.d.ts +4 -4
- package/lib/wkt/index.d.ts +1 -1
- package/lib/wkt/shared/index.d.ts +1 -1
- package/lib/wkt/shared/wkt.service.d.ts +19 -19
- package/lib/wkt/wkt.module.d.ts +8 -8
- package/lib/workspace/confirmation-popup/confirmation-popup.component.d.ts +23 -23
- package/lib/workspace/confirmation-popup/confirmation-popup.module.d.ts +14 -14
- package/lib/workspace/confirmation-popup/index.d.ts +2 -2
- package/lib/workspace/index.d.ts +7 -7
- package/lib/workspace/shared/edition-workspace.d.ts +82 -82
- package/lib/workspace/shared/edition-workspace.service.d.ts +52 -52
- package/lib/workspace/shared/feature-workspace.d.ts +18 -18
- package/lib/workspace/shared/feature-workspace.service.d.ts +19 -19
- package/lib/workspace/shared/index.d.ts +7 -7
- package/lib/workspace/shared/wfs-workspace.d.ts +18 -18
- package/lib/workspace/shared/wfs-workspace.service.d.ts +19 -19
- package/lib/workspace/shared/wms-workspace.service.d.ts +22 -22
- package/lib/workspace/shared/workspace.utils.d.ts +10 -10
- package/lib/workspace/widgets/index.d.ts +3 -3
- package/lib/workspace/widgets/ogc-filter/ogc-filter.component.d.ts +29 -29
- package/lib/workspace/widgets/ogc-filter/ogc-filter.module.d.ts +14 -14
- package/lib/workspace/widgets/widgets.d.ts +9 -9
- package/lib/workspace/workspace-selector/workspace-selector.directive.d.ts +32 -32
- package/lib/workspace/workspace-selector/workspace-selector.module.d.ts +11 -11
- package/lib/workspace/workspace-updator/workspace-updator.directive.d.ts +26 -26
- package/lib/workspace/workspace-updator/workspace-updator.module.d.ts +11 -11
- package/lib/workspace/workspace.module.d.ts +14 -14
- package/package.json +4 -4
- package/public_api.d.ts +51 -51
|
@@ -1,347 +1,347 @@
|
|
|
1
|
-
import * as olextent from 'ol/extent';
|
|
2
|
-
import * as olproj from 'ol/proj';
|
|
3
|
-
import * as olstyle from 'ol/style';
|
|
4
|
-
import OlPolygon from 'ol/geom/Polygon';
|
|
5
|
-
import OlPoint from 'ol/geom/Point';
|
|
6
|
-
import OlLineString from 'ol/geom/LineString';
|
|
7
|
-
import OlFormatGeoJSON from 'ol/format/GeoJSON';
|
|
8
|
-
import { uuid } from '@igo2/utils';
|
|
9
|
-
import { getEntityId, getEntityTitle, getEntityRevision, getEntityIcon, getEntityProperty } from '@igo2/common';
|
|
10
|
-
import { VectorLayer } from '../../layer/shared/layers/vector-layer';
|
|
11
|
-
import { FeatureDataSource } from '../../datasource';
|
|
12
|
-
import { FEATURE, FeatureMotion } from './feature.enums';
|
|
13
|
-
/**
|
|
14
|
-
* Create an Openlayers feature object out of a feature definition.
|
|
15
|
-
* The output object has a reference to the feature id.
|
|
16
|
-
* @param feature Feature definition
|
|
17
|
-
* @param projectionOut Feature object projection
|
|
18
|
-
* @returns OpenLayers feature object
|
|
19
|
-
*/
|
|
20
|
-
export function featureToOl(feature, projectionOut, getId) {
|
|
21
|
-
getId = getId ? getId : getEntityId;
|
|
22
|
-
const olFormat = new OlFormatGeoJSON();
|
|
23
|
-
const olFeature = olFormat.readFeature(feature, {
|
|
24
|
-
dataProjection: feature.projection,
|
|
25
|
-
featureProjection: projectionOut
|
|
26
|
-
});
|
|
27
|
-
olFeature.setId(getId(feature));
|
|
28
|
-
const title = getEntityTitle(feature);
|
|
29
|
-
if (title !== undefined) {
|
|
30
|
-
olFeature.set('_title', title, true);
|
|
31
|
-
}
|
|
32
|
-
if (feature.extent !== undefined) {
|
|
33
|
-
olFeature.set('_extent', feature.extent, true);
|
|
34
|
-
}
|
|
35
|
-
if (feature.projection !== undefined) {
|
|
36
|
-
olFeature.set('_projection', feature.projection, true);
|
|
37
|
-
}
|
|
38
|
-
const mapTitle = getEntityProperty(feature, 'meta.mapTitle');
|
|
39
|
-
if (mapTitle !== undefined) {
|
|
40
|
-
olFeature.set('_mapTitle', mapTitle, true);
|
|
41
|
-
}
|
|
42
|
-
olFeature.set('_entityRevision', getEntityRevision(feature), true);
|
|
43
|
-
const icon = getEntityIcon(feature);
|
|
44
|
-
if (icon !== undefined) {
|
|
45
|
-
olFeature.set('_icon', icon, true);
|
|
46
|
-
}
|
|
47
|
-
if (feature.meta && feature.meta.style) {
|
|
48
|
-
olFeature.set('_style', feature.meta.style, true);
|
|
49
|
-
}
|
|
50
|
-
if (feature.sourceId) {
|
|
51
|
-
olFeature.set('_sourceId', feature.sourceId, true);
|
|
52
|
-
}
|
|
53
|
-
return olFeature;
|
|
54
|
-
}
|
|
55
|
-
export function renderFeatureFromOl(olRenderFeature, projectionIn, olLayer, projectionOut = 'EPSG:4326') {
|
|
56
|
-
let geom;
|
|
57
|
-
let title;
|
|
58
|
-
let exclude;
|
|
59
|
-
let excludeOffline;
|
|
60
|
-
if (olLayer) {
|
|
61
|
-
title = olLayer.get('title');
|
|
62
|
-
if (olLayer.get('sourceOptions')) {
|
|
63
|
-
exclude = olLayer.get('sourceOptions').excludeAttribute;
|
|
64
|
-
excludeOffline = olLayer.get('sourceOptions').excludeAttributeOffline;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
else {
|
|
68
|
-
title = olRenderFeature.get('_title');
|
|
69
|
-
}
|
|
70
|
-
const olFormat = new OlFormatGeoJSON();
|
|
71
|
-
const properties = olRenderFeature.getProperties();
|
|
72
|
-
const geometryType = olRenderFeature.getType();
|
|
73
|
-
if (geometryType === 'Polygon') {
|
|
74
|
-
const ends = olRenderFeature.getEnds();
|
|
75
|
-
geom = new OlPolygon(olRenderFeature.getFlatCoordinates(), 'XY', ends);
|
|
76
|
-
}
|
|
77
|
-
else if (geometryType === 'Point') {
|
|
78
|
-
geom = new OlPoint(olRenderFeature.getFlatCoordinates(), 'XY');
|
|
79
|
-
}
|
|
80
|
-
else if (geometryType === 'LineString') {
|
|
81
|
-
geom = new OlLineString(olRenderFeature.getFlatCoordinates(), 'XY');
|
|
82
|
-
}
|
|
83
|
-
const geometry = olFormat.writeGeometryObject(geom, {
|
|
84
|
-
dataProjection: projectionOut,
|
|
85
|
-
featureProjection: projectionIn
|
|
86
|
-
});
|
|
87
|
-
const id = olRenderFeature.getId() ? olRenderFeature.getId() : uuid();
|
|
88
|
-
const mapTitle = olRenderFeature.get('_mapTitle');
|
|
89
|
-
const extent = olproj.transformExtent(olRenderFeature.getExtent(), projectionIn, projectionOut);
|
|
90
|
-
return {
|
|
91
|
-
type: FEATURE,
|
|
92
|
-
projection: projectionOut,
|
|
93
|
-
extent,
|
|
94
|
-
meta: {
|
|
95
|
-
id,
|
|
96
|
-
title: title ? title : mapTitle ? mapTitle : id,
|
|
97
|
-
mapTitle,
|
|
98
|
-
excludeAttribute: exclude,
|
|
99
|
-
excludeAttributeOffline: excludeOffline
|
|
100
|
-
},
|
|
101
|
-
properties,
|
|
102
|
-
geometry,
|
|
103
|
-
ol: olRenderFeature
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Create a feature object out of an OL feature
|
|
108
|
-
* The output object has a reference to the feature id.
|
|
109
|
-
* @param olFeature OL Feature
|
|
110
|
-
* @param projectionIn OL feature projection
|
|
111
|
-
* @param olLayer OL Layer
|
|
112
|
-
* @param projectionOut Feature projection
|
|
113
|
-
* @returns Feature
|
|
114
|
-
*/
|
|
115
|
-
export function featureFromOl(olFeature, projectionIn, olLayer, projectionOut = 'EPSG:4326') {
|
|
116
|
-
let title;
|
|
117
|
-
let exclude;
|
|
118
|
-
let excludeOffline;
|
|
119
|
-
let idColumn; // for arcgisrest and tilearcgisrest source
|
|
120
|
-
const olFormat = new OlFormatGeoJSON();
|
|
121
|
-
const keys = olFeature.getKeys().filter((key) => {
|
|
122
|
-
return !key.startsWith('_') && key !== 'geometry';
|
|
123
|
-
});
|
|
124
|
-
const properties = keys.reduce((acc, key) => {
|
|
125
|
-
acc[key] = olFeature.get(key);
|
|
126
|
-
return acc;
|
|
127
|
-
}, {});
|
|
128
|
-
const geometry = olFormat.writeGeometryObject(olFeature.getGeometry(), {
|
|
129
|
-
dataProjection: projectionOut,
|
|
130
|
-
featureProjection: projectionIn
|
|
131
|
-
});
|
|
132
|
-
if (olLayer) {
|
|
133
|
-
title = olLayer.get('title');
|
|
134
|
-
const sourceOptions = olLayer.get('sourceOptions');
|
|
135
|
-
if (sourceOptions) {
|
|
136
|
-
exclude = sourceOptions.excludeAttribute;
|
|
137
|
-
excludeOffline = sourceOptions.excludeAttributeOffline;
|
|
138
|
-
idColumn =
|
|
139
|
-
sourceOptions.idColumn ||
|
|
140
|
-
((sourceOptions.type === 'arcgisrest' || sourceOptions.type === 'tilearcgisrest') ? 'OBJECTID' : undefined);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
title = olFeature.get('_title');
|
|
145
|
-
}
|
|
146
|
-
const mapTitle = olFeature.get('_mapTitle');
|
|
147
|
-
const id = olFeature.getId() ? olFeature.getId() : olFeature.get(idColumn) ? olFeature.get(idColumn) : uuid();
|
|
148
|
-
const newFeature = olFeature.get('_newFeature');
|
|
149
|
-
return {
|
|
150
|
-
type: FEATURE,
|
|
151
|
-
projection: projectionOut,
|
|
152
|
-
extent: olFeature.get('_extent'),
|
|
153
|
-
meta: {
|
|
154
|
-
id,
|
|
155
|
-
title: title ? title : mapTitle ? mapTitle : id,
|
|
156
|
-
mapTitle,
|
|
157
|
-
revision: olFeature.getRevision(),
|
|
158
|
-
style: olFeature.get('_style'),
|
|
159
|
-
excludeAttribute: exclude,
|
|
160
|
-
excludeAttributeOffline: excludeOffline
|
|
161
|
-
},
|
|
162
|
-
properties,
|
|
163
|
-
geometry,
|
|
164
|
-
ol: olFeature
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Compute an OL feature extent in it's map projection
|
|
169
|
-
* @param map Map
|
|
170
|
-
* @param olFeature OL feature
|
|
171
|
-
* @returns Extent in the map projection
|
|
172
|
-
*/
|
|
173
|
-
export function computeOlFeatureExtent(map, olFeature) {
|
|
174
|
-
let olExtent = olextent.createEmpty();
|
|
175
|
-
const olFeatureExtent = olFeature.get('_extent');
|
|
176
|
-
const olFeatureProjection = olFeature.get('_projection');
|
|
177
|
-
if (olFeatureExtent !== undefined && olFeatureProjection !== undefined) {
|
|
178
|
-
olExtent = olproj.transformExtent(olFeatureExtent, olFeatureProjection, map.projection);
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
const olGeometry = olFeature.getGeometry();
|
|
182
|
-
if (olGeometry !== null) {
|
|
183
|
-
olExtent = olGeometry.getExtent();
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
return olExtent;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Compute a multiple OL features extent in their map projection
|
|
190
|
-
* @param map Map
|
|
191
|
-
* @param olFeatures OL features
|
|
192
|
-
* @returns Extent in the map projection
|
|
193
|
-
*/
|
|
194
|
-
export function computeOlFeaturesExtent(map, olFeatures) {
|
|
195
|
-
const extent = olextent.createEmpty();
|
|
196
|
-
olFeatures.forEach((olFeature) => {
|
|
197
|
-
const featureExtent = computeOlFeatureExtent(map, olFeature);
|
|
198
|
-
olextent.extend(extent, featureExtent);
|
|
199
|
-
});
|
|
200
|
-
return extent;
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* Scale an extent.
|
|
204
|
-
* @param extent Extent
|
|
205
|
-
* @param Scaling factors for top, right, bottom and left directions, in that order
|
|
206
|
-
* @returns Scaled extent
|
|
207
|
-
*/
|
|
208
|
-
export function scaleExtent(extent, scale) {
|
|
209
|
-
const [width, height] = olextent.getSize(extent);
|
|
210
|
-
return [
|
|
211
|
-
scale[3] ? extent[0] - width * scale[3] : extent[0],
|
|
212
|
-
scale[2] ? extent[1] - height * scale[2] : extent[1],
|
|
213
|
-
scale[1] ? extent[2] + width * scale[1] : extent[2],
|
|
214
|
-
scale[0] ? extent[3] + height * scale[0] : extent[3]
|
|
215
|
-
];
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* Return true if features are out of view.
|
|
219
|
-
* If features are too close to the edge, they are considered out of view.
|
|
220
|
-
* We define the edge as 5% of the extent size.
|
|
221
|
-
* @param map Map
|
|
222
|
-
* @param featuresExtent The features's extent
|
|
223
|
-
* @returns Return true if features are out of view
|
|
224
|
-
*/
|
|
225
|
-
export function featuresAreOutOfView(map, featuresExtent) {
|
|
226
|
-
const mapExtent = map.viewController.getExtent();
|
|
227
|
-
const edgeRatio = 0.05;
|
|
228
|
-
const scale = [-1, -1, -1, -1].map(x => x * edgeRatio);
|
|
229
|
-
const viewExtent = scaleExtent(mapExtent, scale);
|
|
230
|
-
return !olextent.containsExtent(viewExtent, featuresExtent);
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Return true if features are too deep into the view. This results
|
|
234
|
-
* in features being too small.
|
|
235
|
-
* Features are considered too small if their extent occupies less than
|
|
236
|
-
* 1% of the map extent.
|
|
237
|
-
* @param map Map
|
|
238
|
-
* @param featuresExtent The features's extent
|
|
239
|
-
* @param areaRatio The features extent to view extent acceptable ratio
|
|
240
|
-
* @returns Return true if features are too deep in the view
|
|
241
|
-
*/
|
|
242
|
-
export function featuresAreTooDeepInView(map, featuresExtent, areaRatio) {
|
|
243
|
-
// An area ratio of 0.004 means that the feature extent's width and height
|
|
244
|
-
// should be about 1/16 of the map extent's width and height
|
|
245
|
-
areaRatio = areaRatio ? areaRatio : 0.004;
|
|
246
|
-
const mapExtent = map.viewController.getExtent();
|
|
247
|
-
const mapExtentArea = olextent.getArea(mapExtent);
|
|
248
|
-
const featuresExtentArea = olextent.getArea(featuresExtent);
|
|
249
|
-
if (featuresExtentArea === 0 && map.viewController.getZoom() > 13) {
|
|
250
|
-
// In case it's a point
|
|
251
|
-
return false;
|
|
252
|
-
}
|
|
253
|
-
return featuresExtentArea / mapExtentArea < areaRatio;
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Fit view to include the features extent.
|
|
257
|
-
* By default, this method will let the features occupy about 50% of the viewport.
|
|
258
|
-
* @param map Map
|
|
259
|
-
* @param olFeatures OL features
|
|
260
|
-
* @param motion To motion to the new map view
|
|
261
|
-
* @param scale If this is defined, the original view will be scaled
|
|
262
|
-
* by that factor before any logic is applied.
|
|
263
|
-
*/
|
|
264
|
-
export function moveToOlFeatures(map, olFeatures, motion = FeatureMotion.Default, scale, areaRatio) {
|
|
265
|
-
const featuresExtent = computeOlFeaturesExtent(map, olFeatures);
|
|
266
|
-
let viewExtent = featuresExtent;
|
|
267
|
-
if (scale !== undefined) {
|
|
268
|
-
viewExtent = scaleExtent(viewExtent, scale);
|
|
269
|
-
}
|
|
270
|
-
if (motion === FeatureMotion.Zoom) {
|
|
271
|
-
map.viewController.zoomToExtent(viewExtent);
|
|
272
|
-
}
|
|
273
|
-
else if (motion === FeatureMotion.Move) {
|
|
274
|
-
map.viewController.moveToExtent(viewExtent);
|
|
275
|
-
}
|
|
276
|
-
else if (motion === FeatureMotion.Default) {
|
|
277
|
-
if (featuresAreOutOfView(map, featuresExtent) ||
|
|
278
|
-
featuresAreTooDeepInView(map, featuresExtent, areaRatio)) {
|
|
279
|
-
map.viewController.zoomToExtent(viewExtent);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Hide an OL feature
|
|
285
|
-
* @param olFeature OL feature
|
|
286
|
-
*/
|
|
287
|
-
export function hideOlFeature(olFeature) {
|
|
288
|
-
olFeature.setStyle(new olstyle.Style({}));
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* Try to bind a layer to a store if none is bound already.
|
|
292
|
-
* The layer will also be added to the store's map.
|
|
293
|
-
* If no layer is given to that function, a basic one will be created.
|
|
294
|
-
* @param store The store to bind the layer
|
|
295
|
-
* @param layer An optional VectorLayer
|
|
296
|
-
*/
|
|
297
|
-
export function tryBindStoreLayer(store, layer) {
|
|
298
|
-
if (store.layer !== undefined) {
|
|
299
|
-
if (store.layer.map === undefined) {
|
|
300
|
-
store.map.addLayer(store.layer);
|
|
301
|
-
}
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
layer = layer
|
|
305
|
-
? layer
|
|
306
|
-
: new VectorLayer({
|
|
307
|
-
source: new FeatureDataSource()
|
|
308
|
-
});
|
|
309
|
-
store.bindLayer(layer);
|
|
310
|
-
if (store.layer.map === undefined) {
|
|
311
|
-
store.map.addLayer(store.layer);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* Compute a diff between a source array of Ol features and a target array
|
|
316
|
-
* @param source Source array of OL features
|
|
317
|
-
* @param starget Target array of OL features
|
|
318
|
-
* @returns Features to add and remove
|
|
319
|
-
*/
|
|
320
|
-
export function computeOlFeaturesDiff(source, target) {
|
|
321
|
-
const olFeaturesMap = new Map();
|
|
322
|
-
target.forEach((olFeature) => {
|
|
323
|
-
olFeaturesMap.set(olFeature.getId(), olFeature);
|
|
324
|
-
});
|
|
325
|
-
const olFeaturesToRemove = [];
|
|
326
|
-
source.forEach((olFeature) => {
|
|
327
|
-
const newOlFeature = olFeaturesMap.get(olFeature.getId());
|
|
328
|
-
if (newOlFeature === undefined) {
|
|
329
|
-
olFeaturesToRemove.push(olFeature);
|
|
330
|
-
}
|
|
331
|
-
else if (newOlFeature.get('_entityRevision') !== olFeature.get('_entityRevision')) {
|
|
332
|
-
olFeaturesToRemove.push(olFeature);
|
|
333
|
-
}
|
|
334
|
-
else {
|
|
335
|
-
olFeaturesMap.delete(newOlFeature.getId());
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
const olFeaturesToAddIds = Array.from(olFeaturesMap.keys());
|
|
339
|
-
const olFeaturesToAdd = target.filter((olFeature) => {
|
|
340
|
-
return olFeaturesToAddIds.indexOf(olFeature.getId()) >= 0;
|
|
341
|
-
});
|
|
342
|
-
return {
|
|
343
|
-
add: olFeaturesToAdd,
|
|
344
|
-
remove: olFeaturesToRemove
|
|
345
|
-
};
|
|
346
|
-
}
|
|
1
|
+
import * as olextent from 'ol/extent';
|
|
2
|
+
import * as olproj from 'ol/proj';
|
|
3
|
+
import * as olstyle from 'ol/style';
|
|
4
|
+
import OlPolygon from 'ol/geom/Polygon';
|
|
5
|
+
import OlPoint from 'ol/geom/Point';
|
|
6
|
+
import OlLineString from 'ol/geom/LineString';
|
|
7
|
+
import OlFormatGeoJSON from 'ol/format/GeoJSON';
|
|
8
|
+
import { uuid } from '@igo2/utils';
|
|
9
|
+
import { getEntityId, getEntityTitle, getEntityRevision, getEntityIcon, getEntityProperty } from '@igo2/common';
|
|
10
|
+
import { VectorLayer } from '../../layer/shared/layers/vector-layer';
|
|
11
|
+
import { FeatureDataSource } from '../../datasource';
|
|
12
|
+
import { FEATURE, FeatureMotion } from './feature.enums';
|
|
13
|
+
/**
|
|
14
|
+
* Create an Openlayers feature object out of a feature definition.
|
|
15
|
+
* The output object has a reference to the feature id.
|
|
16
|
+
* @param feature Feature definition
|
|
17
|
+
* @param projectionOut Feature object projection
|
|
18
|
+
* @returns OpenLayers feature object
|
|
19
|
+
*/
|
|
20
|
+
export function featureToOl(feature, projectionOut, getId) {
|
|
21
|
+
getId = getId ? getId : getEntityId;
|
|
22
|
+
const olFormat = new OlFormatGeoJSON();
|
|
23
|
+
const olFeature = olFormat.readFeature(feature, {
|
|
24
|
+
dataProjection: feature.projection,
|
|
25
|
+
featureProjection: projectionOut
|
|
26
|
+
});
|
|
27
|
+
olFeature.setId(getId(feature));
|
|
28
|
+
const title = getEntityTitle(feature);
|
|
29
|
+
if (title !== undefined) {
|
|
30
|
+
olFeature.set('_title', title, true);
|
|
31
|
+
}
|
|
32
|
+
if (feature.extent !== undefined) {
|
|
33
|
+
olFeature.set('_extent', feature.extent, true);
|
|
34
|
+
}
|
|
35
|
+
if (feature.projection !== undefined) {
|
|
36
|
+
olFeature.set('_projection', feature.projection, true);
|
|
37
|
+
}
|
|
38
|
+
const mapTitle = getEntityProperty(feature, 'meta.mapTitle');
|
|
39
|
+
if (mapTitle !== undefined) {
|
|
40
|
+
olFeature.set('_mapTitle', mapTitle, true);
|
|
41
|
+
}
|
|
42
|
+
olFeature.set('_entityRevision', getEntityRevision(feature), true);
|
|
43
|
+
const icon = getEntityIcon(feature);
|
|
44
|
+
if (icon !== undefined) {
|
|
45
|
+
olFeature.set('_icon', icon, true);
|
|
46
|
+
}
|
|
47
|
+
if (feature.meta && feature.meta.style) {
|
|
48
|
+
olFeature.set('_style', feature.meta.style, true);
|
|
49
|
+
}
|
|
50
|
+
if (feature.sourceId) {
|
|
51
|
+
olFeature.set('_sourceId', feature.sourceId, true);
|
|
52
|
+
}
|
|
53
|
+
return olFeature;
|
|
54
|
+
}
|
|
55
|
+
export function renderFeatureFromOl(olRenderFeature, projectionIn, olLayer, projectionOut = 'EPSG:4326') {
|
|
56
|
+
let geom;
|
|
57
|
+
let title;
|
|
58
|
+
let exclude;
|
|
59
|
+
let excludeOffline;
|
|
60
|
+
if (olLayer) {
|
|
61
|
+
title = olLayer.get('title');
|
|
62
|
+
if (olLayer.get('sourceOptions')) {
|
|
63
|
+
exclude = olLayer.get('sourceOptions').excludeAttribute;
|
|
64
|
+
excludeOffline = olLayer.get('sourceOptions').excludeAttributeOffline;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
title = olRenderFeature.get('_title');
|
|
69
|
+
}
|
|
70
|
+
const olFormat = new OlFormatGeoJSON();
|
|
71
|
+
const properties = olRenderFeature.getProperties();
|
|
72
|
+
const geometryType = olRenderFeature.getType();
|
|
73
|
+
if (geometryType === 'Polygon') {
|
|
74
|
+
const ends = olRenderFeature.getEnds();
|
|
75
|
+
geom = new OlPolygon(olRenderFeature.getFlatCoordinates(), 'XY', ends);
|
|
76
|
+
}
|
|
77
|
+
else if (geometryType === 'Point') {
|
|
78
|
+
geom = new OlPoint(olRenderFeature.getFlatCoordinates(), 'XY');
|
|
79
|
+
}
|
|
80
|
+
else if (geometryType === 'LineString') {
|
|
81
|
+
geom = new OlLineString(olRenderFeature.getFlatCoordinates(), 'XY');
|
|
82
|
+
}
|
|
83
|
+
const geometry = olFormat.writeGeometryObject(geom, {
|
|
84
|
+
dataProjection: projectionOut,
|
|
85
|
+
featureProjection: projectionIn
|
|
86
|
+
});
|
|
87
|
+
const id = olRenderFeature.getId() ? olRenderFeature.getId() : uuid();
|
|
88
|
+
const mapTitle = olRenderFeature.get('_mapTitle');
|
|
89
|
+
const extent = olproj.transformExtent(olRenderFeature.getExtent(), projectionIn, projectionOut);
|
|
90
|
+
return {
|
|
91
|
+
type: FEATURE,
|
|
92
|
+
projection: projectionOut,
|
|
93
|
+
extent,
|
|
94
|
+
meta: {
|
|
95
|
+
id,
|
|
96
|
+
title: title ? title : mapTitle ? mapTitle : id,
|
|
97
|
+
mapTitle,
|
|
98
|
+
excludeAttribute: exclude,
|
|
99
|
+
excludeAttributeOffline: excludeOffline
|
|
100
|
+
},
|
|
101
|
+
properties,
|
|
102
|
+
geometry,
|
|
103
|
+
ol: olRenderFeature
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Create a feature object out of an OL feature
|
|
108
|
+
* The output object has a reference to the feature id.
|
|
109
|
+
* @param olFeature OL Feature
|
|
110
|
+
* @param projectionIn OL feature projection
|
|
111
|
+
* @param olLayer OL Layer
|
|
112
|
+
* @param projectionOut Feature projection
|
|
113
|
+
* @returns Feature
|
|
114
|
+
*/
|
|
115
|
+
export function featureFromOl(olFeature, projectionIn, olLayer, projectionOut = 'EPSG:4326') {
|
|
116
|
+
let title;
|
|
117
|
+
let exclude;
|
|
118
|
+
let excludeOffline;
|
|
119
|
+
let idColumn; // for arcgisrest and tilearcgisrest source
|
|
120
|
+
const olFormat = new OlFormatGeoJSON();
|
|
121
|
+
const keys = olFeature.getKeys().filter((key) => {
|
|
122
|
+
return !key.startsWith('_') && key !== 'geometry';
|
|
123
|
+
});
|
|
124
|
+
const properties = keys.reduce((acc, key) => {
|
|
125
|
+
acc[key] = olFeature.get(key);
|
|
126
|
+
return acc;
|
|
127
|
+
}, {});
|
|
128
|
+
const geometry = olFormat.writeGeometryObject(olFeature.getGeometry(), {
|
|
129
|
+
dataProjection: projectionOut,
|
|
130
|
+
featureProjection: projectionIn
|
|
131
|
+
});
|
|
132
|
+
if (olLayer) {
|
|
133
|
+
title = olLayer.get('title');
|
|
134
|
+
const sourceOptions = olLayer.get('sourceOptions');
|
|
135
|
+
if (sourceOptions) {
|
|
136
|
+
exclude = sourceOptions.excludeAttribute;
|
|
137
|
+
excludeOffline = sourceOptions.excludeAttributeOffline;
|
|
138
|
+
idColumn =
|
|
139
|
+
sourceOptions.idColumn ||
|
|
140
|
+
((sourceOptions.type === 'arcgisrest' || sourceOptions.type === 'tilearcgisrest') ? 'OBJECTID' : undefined);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
title = olFeature.get('_title');
|
|
145
|
+
}
|
|
146
|
+
const mapTitle = olFeature.get('_mapTitle');
|
|
147
|
+
const id = olFeature.getId() ? olFeature.getId() : olFeature.get(idColumn) ? olFeature.get(idColumn) : uuid();
|
|
148
|
+
const newFeature = olFeature.get('_newFeature');
|
|
149
|
+
return {
|
|
150
|
+
type: FEATURE,
|
|
151
|
+
projection: projectionOut,
|
|
152
|
+
extent: olFeature.get('_extent'),
|
|
153
|
+
meta: {
|
|
154
|
+
id,
|
|
155
|
+
title: title ? title : mapTitle ? mapTitle : id,
|
|
156
|
+
mapTitle,
|
|
157
|
+
revision: olFeature.getRevision(),
|
|
158
|
+
style: olFeature.get('_style'),
|
|
159
|
+
excludeAttribute: exclude,
|
|
160
|
+
excludeAttributeOffline: excludeOffline
|
|
161
|
+
},
|
|
162
|
+
properties,
|
|
163
|
+
geometry,
|
|
164
|
+
ol: olFeature
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Compute an OL feature extent in it's map projection
|
|
169
|
+
* @param map Map
|
|
170
|
+
* @param olFeature OL feature
|
|
171
|
+
* @returns Extent in the map projection
|
|
172
|
+
*/
|
|
173
|
+
export function computeOlFeatureExtent(map, olFeature) {
|
|
174
|
+
let olExtent = olextent.createEmpty();
|
|
175
|
+
const olFeatureExtent = olFeature.get('_extent');
|
|
176
|
+
const olFeatureProjection = olFeature.get('_projection');
|
|
177
|
+
if (olFeatureExtent !== undefined && olFeatureProjection !== undefined) {
|
|
178
|
+
olExtent = olproj.transformExtent(olFeatureExtent, olFeatureProjection, map.projection);
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
const olGeometry = olFeature.getGeometry();
|
|
182
|
+
if (olGeometry !== null) {
|
|
183
|
+
olExtent = olGeometry.getExtent();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return olExtent;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Compute a multiple OL features extent in their map projection
|
|
190
|
+
* @param map Map
|
|
191
|
+
* @param olFeatures OL features
|
|
192
|
+
* @returns Extent in the map projection
|
|
193
|
+
*/
|
|
194
|
+
export function computeOlFeaturesExtent(map, olFeatures) {
|
|
195
|
+
const extent = olextent.createEmpty();
|
|
196
|
+
olFeatures.forEach((olFeature) => {
|
|
197
|
+
const featureExtent = computeOlFeatureExtent(map, olFeature);
|
|
198
|
+
olextent.extend(extent, featureExtent);
|
|
199
|
+
});
|
|
200
|
+
return extent;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Scale an extent.
|
|
204
|
+
* @param extent Extent
|
|
205
|
+
* @param Scaling factors for top, right, bottom and left directions, in that order
|
|
206
|
+
* @returns Scaled extent
|
|
207
|
+
*/
|
|
208
|
+
export function scaleExtent(extent, scale) {
|
|
209
|
+
const [width, height] = olextent.getSize(extent);
|
|
210
|
+
return [
|
|
211
|
+
scale[3] ? extent[0] - width * scale[3] : extent[0],
|
|
212
|
+
scale[2] ? extent[1] - height * scale[2] : extent[1],
|
|
213
|
+
scale[1] ? extent[2] + width * scale[1] : extent[2],
|
|
214
|
+
scale[0] ? extent[3] + height * scale[0] : extent[3]
|
|
215
|
+
];
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Return true if features are out of view.
|
|
219
|
+
* If features are too close to the edge, they are considered out of view.
|
|
220
|
+
* We define the edge as 5% of the extent size.
|
|
221
|
+
* @param map Map
|
|
222
|
+
* @param featuresExtent The features's extent
|
|
223
|
+
* @returns Return true if features are out of view
|
|
224
|
+
*/
|
|
225
|
+
export function featuresAreOutOfView(map, featuresExtent) {
|
|
226
|
+
const mapExtent = map.viewController.getExtent();
|
|
227
|
+
const edgeRatio = 0.05;
|
|
228
|
+
const scale = [-1, -1, -1, -1].map(x => x * edgeRatio);
|
|
229
|
+
const viewExtent = scaleExtent(mapExtent, scale);
|
|
230
|
+
return !olextent.containsExtent(viewExtent, featuresExtent);
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Return true if features are too deep into the view. This results
|
|
234
|
+
* in features being too small.
|
|
235
|
+
* Features are considered too small if their extent occupies less than
|
|
236
|
+
* 1% of the map extent.
|
|
237
|
+
* @param map Map
|
|
238
|
+
* @param featuresExtent The features's extent
|
|
239
|
+
* @param areaRatio The features extent to view extent acceptable ratio
|
|
240
|
+
* @returns Return true if features are too deep in the view
|
|
241
|
+
*/
|
|
242
|
+
export function featuresAreTooDeepInView(map, featuresExtent, areaRatio) {
|
|
243
|
+
// An area ratio of 0.004 means that the feature extent's width and height
|
|
244
|
+
// should be about 1/16 of the map extent's width and height
|
|
245
|
+
areaRatio = areaRatio ? areaRatio : 0.004;
|
|
246
|
+
const mapExtent = map.viewController.getExtent();
|
|
247
|
+
const mapExtentArea = olextent.getArea(mapExtent);
|
|
248
|
+
const featuresExtentArea = olextent.getArea(featuresExtent);
|
|
249
|
+
if (featuresExtentArea === 0 && map.viewController.getZoom() > 13) {
|
|
250
|
+
// In case it's a point
|
|
251
|
+
return false;
|
|
252
|
+
}
|
|
253
|
+
return featuresExtentArea / mapExtentArea < areaRatio;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Fit view to include the features extent.
|
|
257
|
+
* By default, this method will let the features occupy about 50% of the viewport.
|
|
258
|
+
* @param map Map
|
|
259
|
+
* @param olFeatures OL features
|
|
260
|
+
* @param motion To motion to the new map view
|
|
261
|
+
* @param scale If this is defined, the original view will be scaled
|
|
262
|
+
* by that factor before any logic is applied.
|
|
263
|
+
*/
|
|
264
|
+
export function moveToOlFeatures(map, olFeatures, motion = FeatureMotion.Default, scale, areaRatio) {
|
|
265
|
+
const featuresExtent = computeOlFeaturesExtent(map, olFeatures);
|
|
266
|
+
let viewExtent = featuresExtent;
|
|
267
|
+
if (scale !== undefined) {
|
|
268
|
+
viewExtent = scaleExtent(viewExtent, scale);
|
|
269
|
+
}
|
|
270
|
+
if (motion === FeatureMotion.Zoom) {
|
|
271
|
+
map.viewController.zoomToExtent(viewExtent);
|
|
272
|
+
}
|
|
273
|
+
else if (motion === FeatureMotion.Move) {
|
|
274
|
+
map.viewController.moveToExtent(viewExtent);
|
|
275
|
+
}
|
|
276
|
+
else if (motion === FeatureMotion.Default) {
|
|
277
|
+
if (featuresAreOutOfView(map, featuresExtent) ||
|
|
278
|
+
featuresAreTooDeepInView(map, featuresExtent, areaRatio)) {
|
|
279
|
+
map.viewController.zoomToExtent(viewExtent);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Hide an OL feature
|
|
285
|
+
* @param olFeature OL feature
|
|
286
|
+
*/
|
|
287
|
+
export function hideOlFeature(olFeature) {
|
|
288
|
+
olFeature.setStyle(new olstyle.Style({}));
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Try to bind a layer to a store if none is bound already.
|
|
292
|
+
* The layer will also be added to the store's map.
|
|
293
|
+
* If no layer is given to that function, a basic one will be created.
|
|
294
|
+
* @param store The store to bind the layer
|
|
295
|
+
* @param layer An optional VectorLayer
|
|
296
|
+
*/
|
|
297
|
+
export function tryBindStoreLayer(store, layer) {
|
|
298
|
+
if (store.layer !== undefined) {
|
|
299
|
+
if (store.layer.map === undefined) {
|
|
300
|
+
store.map.addLayer(store.layer);
|
|
301
|
+
}
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
layer = layer
|
|
305
|
+
? layer
|
|
306
|
+
: new VectorLayer({
|
|
307
|
+
source: new FeatureDataSource()
|
|
308
|
+
});
|
|
309
|
+
store.bindLayer(layer);
|
|
310
|
+
if (store.layer.map === undefined) {
|
|
311
|
+
store.map.addLayer(store.layer);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Compute a diff between a source array of Ol features and a target array
|
|
316
|
+
* @param source Source array of OL features
|
|
317
|
+
* @param starget Target array of OL features
|
|
318
|
+
* @returns Features to add and remove
|
|
319
|
+
*/
|
|
320
|
+
export function computeOlFeaturesDiff(source, target) {
|
|
321
|
+
const olFeaturesMap = new Map();
|
|
322
|
+
target.forEach((olFeature) => {
|
|
323
|
+
olFeaturesMap.set(olFeature.getId(), olFeature);
|
|
324
|
+
});
|
|
325
|
+
const olFeaturesToRemove = [];
|
|
326
|
+
source.forEach((olFeature) => {
|
|
327
|
+
const newOlFeature = olFeaturesMap.get(olFeature.getId());
|
|
328
|
+
if (newOlFeature === undefined) {
|
|
329
|
+
olFeaturesToRemove.push(olFeature);
|
|
330
|
+
}
|
|
331
|
+
else if (newOlFeature.get('_entityRevision') !== olFeature.get('_entityRevision')) {
|
|
332
|
+
olFeaturesToRemove.push(olFeature);
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
olFeaturesMap.delete(newOlFeature.getId());
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
const olFeaturesToAddIds = Array.from(olFeaturesMap.keys());
|
|
339
|
+
const olFeaturesToAdd = target.filter((olFeature) => {
|
|
340
|
+
return olFeaturesToAddIds.indexOf(olFeature.getId()) >= 0;
|
|
341
|
+
});
|
|
342
|
+
return {
|
|
343
|
+
add: olFeaturesToAdd,
|
|
344
|
+
remove: olFeaturesToRemove
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
347
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVhdHVyZS51dGlscy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2dlby9zcmMvbGliL2ZlYXR1cmUvc2hhcmVkL2ZlYXR1cmUudXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLFFBQVEsTUFBTSxXQUFXLENBQUM7QUFDdEMsT0FBTyxLQUFLLE1BQU0sTUFBTSxTQUFTLENBQUM7QUFDbEMsT0FBTyxLQUFLLE9BQU8sTUFBTSxVQUFVLENBQUM7QUFHcEMsT0FBTyxTQUFTLE1BQU0saUJBQWlCLENBQUM7QUFDeEMsT0FBTyxPQUFPLE1BQU0sZUFBZSxDQUFDO0FBQ3BDLE9BQU8sWUFBWSxNQUFNLG9CQUFvQixDQUFDO0F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