@igo2/geo 1.14.2 → 1.14.3
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/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 +4 -4
- package/esm2020/lib/datasource/datasource.module.mjs +21 -21
- package/esm2020/lib/datasource/index.mjs +2 -2
- package/esm2020/lib/datasource/shared/capabilities.service.mjs +430 -430
- 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 +35 -35
- 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 +1 -1
- package/esm2020/lib/directions/directions-inputs/directions-inputs.component.mjs +289 -289
- package/esm2020/lib/directions/directions-inputs/index.mjs +1 -1
- package/esm2020/lib/directions/directions-results/directions-results.component.mjs +195 -195
- package/esm2020/lib/directions/directions-results/index.mjs +1 -1
- 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 +4 -4
- package/esm2020/lib/directions/directions-sources/osrm-directions-source.mjs +98 -98
- package/esm2020/lib/directions/directions.component.mjs +310 -310
- package/esm2020/lib/directions/directions.module.mjs +101 -101
- package/esm2020/lib/directions/index.mjs +6 -6
- package/esm2020/lib/directions/shared/directions-source.service.mjs +16 -16
- package/esm2020/lib/directions/shared/directions.enum.mjs +27 -27
- 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 +5 -5
- 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 +1 -1
- package/esm2020/lib/download/download.module.mjs +41 -41
- package/esm2020/lib/download/index.mjs +2 -2
- package/esm2020/lib/download/shared/download.interface.mjs +1 -1
- package/esm2020/lib/download/shared/download.service.mjs +64 -64
- package/esm2020/lib/download/shared/index.mjs +2 -2
- 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 +2 -2
- 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 +8 -8
- 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 +3 -3
- 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 +4 -4
- package/esm2020/lib/import-export/export-button/export-button.component.mjs +63 -63
- package/esm2020/lib/import-export/export-button/index.mjs +1 -1
- package/esm2020/lib/import-export/import-export/import-export.component.mjs +1219 -1219
- package/esm2020/lib/import-export/import-export/index.mjs +1 -1
- 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 +14 -14
- 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 +10 -10
- 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 +12 -12
- package/esm2020/lib/layer/shared/layers/layer.interface.mjs +17 -17
- 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 +141 -142
- 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 +406 -406
- 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 +3 -3
- 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 +1 -1
- package/esm2020/lib/metadata/metadata-button/metadata-button.component.mjs +133 -133
- package/esm2020/lib/metadata/metadata.module.mjs +54 -54
- package/esm2020/lib/metadata/shared/index.mjs +2 -2
- package/esm2020/lib/metadata/shared/metadata.interface.mjs +1 -1
- package/esm2020/lib/metadata/shared/metadata.service.mjs +18 -18
- 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 +4 -4
- 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 +1 -1
- package/esm2020/lib/overlay/index.mjs +1 -1
- 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 +3 -3
- package/esm2020/lib/print/print/print.component.mjs +125 -125
- package/esm2020/lib/print/print-form/index.mjs +1 -1
- 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 +4 -4
- 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 +1 -1
- package/esm2020/lib/query/query.module.mjs +28 -28
- package/esm2020/lib/query/shared/index.mjs +6 -6
- 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 +29 -29
- 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 +8 -8
- 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 +152 -152
- 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 +766 -766
- 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 +319 -319
- 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 +1 -1
- package/esm2020/lib/search/shared/sources/nominatim.mjs +251 -251
- 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 +424 -424
- package/esm2020/lib/search/shared/sources/storedqueries.providers.mjs +40 -40
- package/esm2020/lib/toast/index.mjs +1 -1
- 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 +1 -1
- package/esm2020/lib/wkt/shared/index.mjs +1 -1
- 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 +7 -7
- 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 +7 -7
- 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 +3 -3
- 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 +14 -14
- 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 +44986 -44986
- package/fesm2015/igo2-geo.mjs.map +1 -1
- package/fesm2020/igo2-geo.mjs +43029 -43030
- 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 -107
- 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,489 +1,489 @@
|
|
|
1
|
-
import * as olstyle from 'ol/style';
|
|
2
|
-
import OlPoint from 'ol/geom/Point';
|
|
3
|
-
import OlLineString from 'ol/geom/LineString';
|
|
4
|
-
import OlPolygon from 'ol/geom/Polygon';
|
|
5
|
-
import OlCircle from 'ol/geom/Circle';
|
|
6
|
-
import OlOverlay from 'ol/Overlay';
|
|
7
|
-
import { getCenter as olGetCenter } from 'ol/extent';
|
|
8
|
-
import { getLength as olGetLength, getArea as olGetArea } from 'ol/sphere';
|
|
9
|
-
import { MeasureAreaUnit, MeasureAreaUnitAbbreviation, MeasureLengthUnit, MeasureLengthUnitAbbreviation } from './measure.enum';
|
|
10
|
-
/**
|
|
11
|
-
* Convert value from meters to kilometers
|
|
12
|
-
* @param value Value in meters
|
|
13
|
-
* @returns Value in kilometers
|
|
14
|
-
*/
|
|
15
|
-
export function metersToKilometers(value) {
|
|
16
|
-
return value * 0.001;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Convert value from meters to feet
|
|
20
|
-
* @param value Value in meters
|
|
21
|
-
* @returns Value in feet
|
|
22
|
-
*/
|
|
23
|
-
export function metersToFeet(value) {
|
|
24
|
-
return value * 3.2808;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Convert value from meters to miles
|
|
28
|
-
* @param value Value in meters
|
|
29
|
-
* @returns Value in miles
|
|
30
|
-
*/
|
|
31
|
-
export function metersToMiles(value) {
|
|
32
|
-
return value * 0.000621;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Convert value from square meters to square kilometers
|
|
36
|
-
* @param value Value in square meters
|
|
37
|
-
* @returns Value in square kilometers
|
|
38
|
-
*/
|
|
39
|
-
export function squareMetersToSquareKilometers(value) {
|
|
40
|
-
return value * 0.000001;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Convert value from square meters to square miles
|
|
44
|
-
* @param value Value in square meters
|
|
45
|
-
* @returns Value in square miles
|
|
46
|
-
*/
|
|
47
|
-
export function squareMetersToSquareMiles(value) {
|
|
48
|
-
return value * 0.0000003861;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Convert value from square meters to square feet
|
|
52
|
-
* @param value Value in square meters
|
|
53
|
-
* @returns Value in square feet
|
|
54
|
-
*/
|
|
55
|
-
export function squareMetersToSquareFeet(value) {
|
|
56
|
-
return value * 10.764;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Convert value from square meters to hectares
|
|
60
|
-
* @param value Value in square meters
|
|
61
|
-
* @returns Value in hectares
|
|
62
|
-
*/
|
|
63
|
-
export function squareMetersToHectares(value) {
|
|
64
|
-
return value * 0.0001;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Convert value from square meters to acres
|
|
68
|
-
* @param value Value in square meters
|
|
69
|
-
* @returns Value in acres
|
|
70
|
-
*/
|
|
71
|
-
export function squareMetersToAcres(value) {
|
|
72
|
-
return value * 0.00024711;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Convert value from meters to the specified length unit
|
|
76
|
-
* @param value Value in meters
|
|
77
|
-
* @param unit Length unit
|
|
78
|
-
* @returns Value in unit
|
|
79
|
-
*/
|
|
80
|
-
export function metersToUnit(value, unit) {
|
|
81
|
-
const conversionMapper = new Map([
|
|
82
|
-
[MeasureLengthUnit.Meters, (val) => val],
|
|
83
|
-
[MeasureLengthUnit.Kilometers, metersToKilometers],
|
|
84
|
-
[MeasureLengthUnit.Miles, metersToMiles],
|
|
85
|
-
[MeasureLengthUnit.Feet, metersToFeet],
|
|
86
|
-
]);
|
|
87
|
-
const conversion = conversionMapper.get(unit);
|
|
88
|
-
return conversion ? conversion(value) : undefined;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Convert value from square meters to the specified area unit
|
|
92
|
-
* @param value Value in meters
|
|
93
|
-
* @param unit Area unit
|
|
94
|
-
* @returns Value in unit
|
|
95
|
-
*/
|
|
96
|
-
export function squareMetersToUnit(value, unit) {
|
|
97
|
-
const conversionMapper = new Map([
|
|
98
|
-
[MeasureAreaUnit.SquareMeters, (val) => val],
|
|
99
|
-
[MeasureAreaUnit.SquareKilometers, squareMetersToSquareKilometers],
|
|
100
|
-
[MeasureAreaUnit.SquareMiles, squareMetersToSquareMiles],
|
|
101
|
-
[MeasureAreaUnit.SquareFeet, squareMetersToSquareFeet],
|
|
102
|
-
[MeasureAreaUnit.Hectares, squareMetersToHectares],
|
|
103
|
-
[MeasureAreaUnit.Acres, squareMetersToAcres],
|
|
104
|
-
]);
|
|
105
|
-
const conversion = conversionMapper.get(unit);
|
|
106
|
-
return conversion ? conversion(value) : undefined;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* This method format a measure to a readable format
|
|
110
|
-
* @param measure Measure
|
|
111
|
-
* @param options Formatting options
|
|
112
|
-
* @returns Formatted measure
|
|
113
|
-
*/
|
|
114
|
-
export function formatMeasure(measure, options, languageService) {
|
|
115
|
-
let decimal = options.decimal;
|
|
116
|
-
if (decimal === undefined || decimal < 0) {
|
|
117
|
-
decimal = 1;
|
|
118
|
-
}
|
|
119
|
-
const parts = [];
|
|
120
|
-
if (options.locale !== undefined) {
|
|
121
|
-
parts.push(measure.toLocaleString(options.locale, {
|
|
122
|
-
minimumFractionDigits: decimal,
|
|
123
|
-
maximumFractionDigits: decimal
|
|
124
|
-
}));
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
parts.push(measure.toFixed(decimal).toString());
|
|
128
|
-
}
|
|
129
|
-
if (options.unit !== undefined && options.unitAbbr === true) {
|
|
130
|
-
if (languageService) {
|
|
131
|
-
parts.push(MeasureLengthUnitAbbreviation[options.unit] ?
|
|
132
|
-
languageService.translate.instant('igo.geo.measure.' + MeasureLengthUnitAbbreviation[options.unit]) :
|
|
133
|
-
languageService.translate.instant('igo.geo.measure.' + MeasureAreaUnitAbbreviation[options.unit]));
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
parts.push(MeasureLengthUnitAbbreviation[options.unit] || MeasureAreaUnitAbbreviation[options.unit]);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
return parts.filter(p => p !== undefined).join(' ');
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Compute best length measure unit for a given measure in meters
|
|
143
|
-
* @param value Value in meters
|
|
144
|
-
* @returns Measure unit
|
|
145
|
-
*/
|
|
146
|
-
export function computeBestLengthUnit(value) {
|
|
147
|
-
let unit = MeasureLengthUnit.Meters;
|
|
148
|
-
let converted = value;
|
|
149
|
-
const possibleUnits = [MeasureLengthUnit.Kilometers];
|
|
150
|
-
while (converted > 1000 && possibleUnits.length > 0) {
|
|
151
|
-
unit = possibleUnits.pop();
|
|
152
|
-
converted = metersToUnit(value, unit);
|
|
153
|
-
}
|
|
154
|
-
return unit;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Compute best length measure unit for a given measure in square meters
|
|
158
|
-
* @param value Value in meters
|
|
159
|
-
* @returns Measure unit
|
|
160
|
-
*/
|
|
161
|
-
export function computeBestAreaUnit(value) {
|
|
162
|
-
let unit = MeasureAreaUnit.SquareMeters;
|
|
163
|
-
let converted = value;
|
|
164
|
-
const possibleUnits = [MeasureAreaUnit.SquareKilometers];
|
|
165
|
-
while (converted > 1000000 && possibleUnits.length > 0) {
|
|
166
|
-
unit = possibleUnits.pop();
|
|
167
|
-
converted = squareMetersToUnit(value, unit);
|
|
168
|
-
}
|
|
169
|
-
return unit;
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Create a default style for a measure interaction
|
|
173
|
-
* @returns OL style
|
|
174
|
-
*/
|
|
175
|
-
export function createMeasureInteractionStyle() {
|
|
176
|
-
return new olstyle.Style({
|
|
177
|
-
stroke: new olstyle.Stroke({
|
|
178
|
-
color: '#ffcc33',
|
|
179
|
-
lineDash: [10, 10],
|
|
180
|
-
width: 2
|
|
181
|
-
}),
|
|
182
|
-
fill: new olstyle.Fill({
|
|
183
|
-
color: 'rgba(255, 255, 255, 0.2)'
|
|
184
|
-
}),
|
|
185
|
-
image: new olstyle.Circle({
|
|
186
|
-
radius: 5,
|
|
187
|
-
stroke: new olstyle.Stroke({
|
|
188
|
-
color: '#ffcc33',
|
|
189
|
-
}),
|
|
190
|
-
fill: new olstyle.Fill({
|
|
191
|
-
color: 'rgba(255, 255, 255, 0.2)'
|
|
192
|
-
})
|
|
193
|
-
})
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Create a default style for a measure layer
|
|
198
|
-
* @returns OL style
|
|
199
|
-
*/
|
|
200
|
-
export function createMeasureLayerStyle() {
|
|
201
|
-
return new olstyle.Style({
|
|
202
|
-
stroke: new olstyle.Stroke({
|
|
203
|
-
color: '#ffcc33',
|
|
204
|
-
width: 2
|
|
205
|
-
}),
|
|
206
|
-
fill: new olstyle.Fill({
|
|
207
|
-
color: 'rgba(255, 255, 255, 0.2)'
|
|
208
|
-
})
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* Compute the length in meters of an OL geometry with a given projection
|
|
213
|
-
* @param olGeometry Ol geometry
|
|
214
|
-
* @param projection olGeometry's projection
|
|
215
|
-
* @returns Length in meters
|
|
216
|
-
*/
|
|
217
|
-
export function measureOlGeometryLength(olGeometry, projection) {
|
|
218
|
-
if (olGeometry instanceof OlPoint) {
|
|
219
|
-
return undefined;
|
|
220
|
-
}
|
|
221
|
-
if (olGeometry.getFlatCoordinates().length === 0) {
|
|
222
|
-
return undefined;
|
|
223
|
-
}
|
|
224
|
-
return olGetLength(olGeometry, { projection });
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Compute the area in square meters of an OL geometry with a given projection
|
|
228
|
-
* @param olGeometry Ol geometry
|
|
229
|
-
* @param projection olGeometry's projection
|
|
230
|
-
* @returns Area in square meters
|
|
231
|
-
*/
|
|
232
|
-
export function measureOlGeometryArea(olGeometry, projection) {
|
|
233
|
-
if (olGeometry instanceof OlPoint || olGeometry instanceof OlLineString) {
|
|
234
|
-
return undefined;
|
|
235
|
-
}
|
|
236
|
-
if (olGeometry.getFlatCoordinates().length === 0) {
|
|
237
|
-
return undefined;
|
|
238
|
-
}
|
|
239
|
-
return olGetArea(olGeometry, { projection });
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Compute the area (square meters), length (meters) and last length (meters)
|
|
243
|
-
* of an OL geometry with a given projection.
|
|
244
|
-
* @param olGeometry Ol geometry
|
|
245
|
-
* @param projection olGeometry's projection
|
|
246
|
-
* @returns Computed measure
|
|
247
|
-
*/
|
|
248
|
-
export function measureOlGeometry(olGeometry, projection) {
|
|
249
|
-
const length = measureOlGeometryLength(olGeometry, projection);
|
|
250
|
-
const area = measureOlGeometryArea(olGeometry, projection);
|
|
251
|
-
const lengths = [];
|
|
252
|
-
const coordinates = olGeometry.getFlatCoordinates();
|
|
253
|
-
const coordinatesLength = coordinates.length;
|
|
254
|
-
for (let i = 0; i <= coordinatesLength - 4; i += 2) {
|
|
255
|
-
const olSegment = new OlLineString([
|
|
256
|
-
[coordinates[i], coordinates[i + 1]],
|
|
257
|
-
[coordinates[i + 2], coordinates[i + 3]]
|
|
258
|
-
]);
|
|
259
|
-
lengths.push(measureOlGeometryLength(olSegment, projection));
|
|
260
|
-
}
|
|
261
|
-
return {
|
|
262
|
-
area,
|
|
263
|
-
length,
|
|
264
|
-
lengths
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* Update an OL geometry midpoints and return an array of those points
|
|
269
|
-
* @param olGeometry OL Geometry
|
|
270
|
-
* @returns OL points
|
|
271
|
-
*/
|
|
272
|
-
export function updateOlGeometryMidpoints(olGeometry) {
|
|
273
|
-
let olMidpoints;
|
|
274
|
-
if (olGeometry instanceof OlPoint) {
|
|
275
|
-
const olMidpointPoint = new OlPoint(olGeometry.getFlatCoordinates());
|
|
276
|
-
olMidpoints = new Array(1);
|
|
277
|
-
olMidpoints[0] = olMidpointPoint;
|
|
278
|
-
}
|
|
279
|
-
else {
|
|
280
|
-
olMidpoints = getOlGeometryMidpoints(olGeometry);
|
|
281
|
-
// TODO: handle multi geometries
|
|
282
|
-
const coordinates = olGeometry.getFlatCoordinates();
|
|
283
|
-
const midpointsLength = olMidpoints.length;
|
|
284
|
-
for (let i = 0; i < midpointsLength; i++) {
|
|
285
|
-
const j = i * 2;
|
|
286
|
-
const olSegment = new OlLineString([
|
|
287
|
-
[coordinates[j], coordinates[j + 1]],
|
|
288
|
-
[coordinates[j + 2], coordinates[j + 3]]
|
|
289
|
-
]);
|
|
290
|
-
const midpointCoordinate = olSegment.getCoordinateAt(0.5);
|
|
291
|
-
const olMidpoint = olMidpoints[i];
|
|
292
|
-
if (olMidpoint !== undefined) {
|
|
293
|
-
olMidpoint.setCoordinates(midpointCoordinate);
|
|
294
|
-
}
|
|
295
|
-
else {
|
|
296
|
-
olMidpoints[i] = new OlPoint(midpointCoordinate);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
return olMidpoints;
|
|
301
|
-
}
|
|
302
|
-
/**
|
|
303
|
-
* Clear an OL geometry midpoints and return an array of those points
|
|
304
|
-
* @param olGeometry OL Geometry
|
|
305
|
-
*/
|
|
306
|
-
export function clearOlGeometryMidpoints(olGeometry) {
|
|
307
|
-
const olMidpoints = olGeometry.get('_midpoints') || [];
|
|
308
|
-
const midpointsLength = olMidpoints.length;
|
|
309
|
-
for (let i = 0; i < midpointsLength; i++) {
|
|
310
|
-
const olMidpoint = olMidpoints[i];
|
|
311
|
-
if (olMidpoint !== undefined) {
|
|
312
|
-
if (olMidpoint !== undefined) {
|
|
313
|
-
clearOlMidpointTooltip(olMidpoint);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
olGeometry.set('_midpoints', undefined, true);
|
|
318
|
-
return olMidpoints;
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* Return an array of OL geometry midpoints, if any
|
|
322
|
-
* @param olGeometry OL Geometry
|
|
323
|
-
* @returns OL points
|
|
324
|
-
*/
|
|
325
|
-
function getOlGeometryMidpoints(olGeometry) {
|
|
326
|
-
let expectedNumber;
|
|
327
|
-
if (olGeometry instanceof OlCircle) {
|
|
328
|
-
expectedNumber = 0;
|
|
329
|
-
}
|
|
330
|
-
else {
|
|
331
|
-
expectedNumber = Math.max((olGeometry.getFlatCoordinates().length / 2) - 1, 0);
|
|
332
|
-
}
|
|
333
|
-
// TODO: This works but it's quite messy. If time permits,
|
|
334
|
-
// clean this. Maybe a Tooltip class could handle that
|
|
335
|
-
let olMidpoints = olGeometry.get('_midpoints');
|
|
336
|
-
if (olMidpoints === undefined) {
|
|
337
|
-
if (olGeometry instanceof OlPoint) {
|
|
338
|
-
olMidpoints = new Array(1);
|
|
339
|
-
}
|
|
340
|
-
else {
|
|
341
|
-
olMidpoints = new Array(expectedNumber);
|
|
342
|
-
}
|
|
343
|
-
olGeometry.set('_midpoints', olMidpoints, true);
|
|
344
|
-
return olMidpoints;
|
|
345
|
-
}
|
|
346
|
-
if (expectedNumber === 0) {
|
|
347
|
-
return olMidpoints;
|
|
348
|
-
}
|
|
349
|
-
if (expectedNumber === olMidpoints.length) {
|
|
350
|
-
return olMidpoints;
|
|
351
|
-
}
|
|
352
|
-
if (expectedNumber > olMidpoints.length) {
|
|
353
|
-
olMidpoints.push(...new Array(expectedNumber - olMidpoints.length));
|
|
354
|
-
return olMidpoints;
|
|
355
|
-
}
|
|
356
|
-
for (let i = expectedNumber; i < olMidpoints.length; i++) {
|
|
357
|
-
const olMidpoint = olMidpoints[expectedNumber];
|
|
358
|
-
if (olMidpoint !== undefined) {
|
|
359
|
-
clearOlMidpointTooltip(olMidpoint);
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
olMidpoints.splice(expectedNumber);
|
|
363
|
-
return olMidpoints;
|
|
364
|
-
}
|
|
365
|
-
/**
|
|
366
|
-
* Remove an OL midpoint's tooltip from the map
|
|
367
|
-
* @param olMidpoint OL Point
|
|
368
|
-
*/
|
|
369
|
-
function clearOlMidpointTooltip(olMidpoint) {
|
|
370
|
-
const olTooltip = olMidpoint.get('_tooltip');
|
|
371
|
-
if (olTooltip !== undefined) {
|
|
372
|
-
const olMap = olTooltip.getMap();
|
|
373
|
-
if (olMap !== undefined) {
|
|
374
|
-
olMap.removeOverlay(olTooltip);
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* Add an OL overlay at each midpoint and return an array of those overlays
|
|
380
|
-
* @param olGeometry OL Geometry
|
|
381
|
-
* @returns OL overlays
|
|
382
|
-
*/
|
|
383
|
-
export function updateOlTooltipsAtMidpoints(olGeometry) {
|
|
384
|
-
const olMidpoints = updateOlGeometryMidpoints(olGeometry);
|
|
385
|
-
let typeGeom = '';
|
|
386
|
-
if (olGeometry instanceof OlLineString) {
|
|
387
|
-
typeGeom = 'line-';
|
|
388
|
-
}
|
|
389
|
-
else if (olGeometry instanceof OlPolygon) {
|
|
390
|
-
typeGeom = 'polygone-';
|
|
391
|
-
}
|
|
392
|
-
const olTooltips = olMidpoints.map((olMidpoint) => {
|
|
393
|
-
let olTooltip = olMidpoint.get('_tooltip');
|
|
394
|
-
if (olTooltip === undefined) {
|
|
395
|
-
olTooltip = createOlTooltipAtPoint(olMidpoint, false, typeGeom);
|
|
396
|
-
}
|
|
397
|
-
else {
|
|
398
|
-
olTooltip.setPosition(olMidpoint.getFlatCoordinates());
|
|
399
|
-
}
|
|
400
|
-
return olTooltip;
|
|
401
|
-
});
|
|
402
|
-
return olTooltips;
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* Return an array of OL overlay at midspoints, if any
|
|
406
|
-
* @param olGeometry OL Geometry
|
|
407
|
-
* @returns OL overlays
|
|
408
|
-
*/
|
|
409
|
-
export function getOlTooltipsAtMidpoints(olGeometry) {
|
|
410
|
-
const olMidpoints = getOlGeometryMidpoints(olGeometry);
|
|
411
|
-
return olMidpoints.map((olMidpoint) => {
|
|
412
|
-
return olMidpoint ? olMidpoint.get('_tooltip') : undefined;
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* Update an OL geometry center and return it
|
|
417
|
-
* @param olGeometry OL Geometry
|
|
418
|
-
* @returns OL point
|
|
419
|
-
*/
|
|
420
|
-
export function updateOlGeometryCenter(olGeometry) {
|
|
421
|
-
let olCenter = olGeometry.get('_center');
|
|
422
|
-
const centerCoordinate = olGetCenter(olGeometry.getExtent());
|
|
423
|
-
if (olCenter !== undefined) {
|
|
424
|
-
olCenter.setCoordinates(centerCoordinate);
|
|
425
|
-
}
|
|
426
|
-
else {
|
|
427
|
-
olCenter = new OlPoint(centerCoordinate);
|
|
428
|
-
olGeometry.set('_center', olCenter);
|
|
429
|
-
}
|
|
430
|
-
return olCenter;
|
|
431
|
-
}
|
|
432
|
-
/**
|
|
433
|
-
* Add an OL overlay at the center of a geometry and return that overlay
|
|
434
|
-
* @param olGeometry OL Geometry
|
|
435
|
-
* @returns OL overlay
|
|
436
|
-
*/
|
|
437
|
-
export function updateOlTooltipAtCenter(olGeometry) {
|
|
438
|
-
const olCenter = updateOlGeometryCenter(olGeometry);
|
|
439
|
-
let olTooltip = olCenter.get('_tooltip');
|
|
440
|
-
if (olTooltip === undefined) {
|
|
441
|
-
olTooltip = createOlTooltipAtPoint(olCenter, true);
|
|
442
|
-
}
|
|
443
|
-
else {
|
|
444
|
-
olTooltip.setPosition(olCenter.getFlatCoordinates());
|
|
445
|
-
}
|
|
446
|
-
return olTooltip;
|
|
447
|
-
}
|
|
448
|
-
/**
|
|
449
|
-
* Return an array of OL overlay at midspoints, if any
|
|
450
|
-
* @param olGeometry OL Geometry
|
|
451
|
-
* @returns OL overlays
|
|
452
|
-
*/
|
|
453
|
-
export function getOlTooltipAtCenter(olGeometry) {
|
|
454
|
-
const olCenter = olGeometry.get('_center');
|
|
455
|
-
return olCenter ? olCenter.get('_tooltip') : undefined;
|
|
456
|
-
}
|
|
457
|
-
/**
|
|
458
|
-
* Get all the tooltips of an OL geometry
|
|
459
|
-
* @param olGeometry OL Geometry
|
|
460
|
-
* @returns OL overlays
|
|
461
|
-
*/
|
|
462
|
-
export function getTooltipsOfOlGeometry(olGeometry) {
|
|
463
|
-
const olTooltips = [].concat(getOlTooltipsAtMidpoints(olGeometry) || []);
|
|
464
|
-
const olCenterTooltip = getOlTooltipAtCenter(olGeometry);
|
|
465
|
-
if (olCenterTooltip !== undefined) {
|
|
466
|
-
olTooltips.push(olCenterTooltip);
|
|
467
|
-
}
|
|
468
|
-
return olTooltips;
|
|
469
|
-
}
|
|
470
|
-
/**
|
|
471
|
-
* Create an OL overlay at a point and bind the overlay to the point
|
|
472
|
-
* @param olPoint OL Point
|
|
473
|
-
* @returns OL overlay
|
|
474
|
-
*/
|
|
475
|
-
export function createOlTooltipAtPoint(olPoint, center = false, srcGeomType = '') {
|
|
476
|
-
const olTooltip = new OlOverlay({
|
|
477
|
-
element: document.createElement('div'),
|
|
478
|
-
offset: [-30, -10],
|
|
479
|
-
className: (center ?
|
|
480
|
-
['igo-map-tooltip',
|
|
481
|
-
'igo-map-tooltip-measure', 'igo-map-tooltip-measure-area'] : ['igo-map-tooltip', 'igo-map-tooltip-measure',
|
|
482
|
-
`igo-map-tooltip-measure-${srcGeomType}segments`]).join(' '),
|
|
483
|
-
stopEvent: false
|
|
484
|
-
});
|
|
485
|
-
olTooltip.setPosition(olPoint.getFlatCoordinates());
|
|
486
|
-
olPoint.set('_tooltip', olTooltip);
|
|
487
|
-
return olTooltip;
|
|
488
|
-
}
|
|
1
|
+
import * as olstyle from 'ol/style';
|
|
2
|
+
import OlPoint from 'ol/geom/Point';
|
|
3
|
+
import OlLineString from 'ol/geom/LineString';
|
|
4
|
+
import OlPolygon from 'ol/geom/Polygon';
|
|
5
|
+
import OlCircle from 'ol/geom/Circle';
|
|
6
|
+
import OlOverlay from 'ol/Overlay';
|
|
7
|
+
import { getCenter as olGetCenter } from 'ol/extent';
|
|
8
|
+
import { getLength as olGetLength, getArea as olGetArea } from 'ol/sphere';
|
|
9
|
+
import { MeasureAreaUnit, MeasureAreaUnitAbbreviation, MeasureLengthUnit, MeasureLengthUnitAbbreviation } from './measure.enum';
|
|
10
|
+
/**
|
|
11
|
+
* Convert value from meters to kilometers
|
|
12
|
+
* @param value Value in meters
|
|
13
|
+
* @returns Value in kilometers
|
|
14
|
+
*/
|
|
15
|
+
export function metersToKilometers(value) {
|
|
16
|
+
return value * 0.001;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Convert value from meters to feet
|
|
20
|
+
* @param value Value in meters
|
|
21
|
+
* @returns Value in feet
|
|
22
|
+
*/
|
|
23
|
+
export function metersToFeet(value) {
|
|
24
|
+
return value * 3.2808;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Convert value from meters to miles
|
|
28
|
+
* @param value Value in meters
|
|
29
|
+
* @returns Value in miles
|
|
30
|
+
*/
|
|
31
|
+
export function metersToMiles(value) {
|
|
32
|
+
return value * 0.000621;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Convert value from square meters to square kilometers
|
|
36
|
+
* @param value Value in square meters
|
|
37
|
+
* @returns Value in square kilometers
|
|
38
|
+
*/
|
|
39
|
+
export function squareMetersToSquareKilometers(value) {
|
|
40
|
+
return value * 0.000001;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Convert value from square meters to square miles
|
|
44
|
+
* @param value Value in square meters
|
|
45
|
+
* @returns Value in square miles
|
|
46
|
+
*/
|
|
47
|
+
export function squareMetersToSquareMiles(value) {
|
|
48
|
+
return value * 0.0000003861;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Convert value from square meters to square feet
|
|
52
|
+
* @param value Value in square meters
|
|
53
|
+
* @returns Value in square feet
|
|
54
|
+
*/
|
|
55
|
+
export function squareMetersToSquareFeet(value) {
|
|
56
|
+
return value * 10.764;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Convert value from square meters to hectares
|
|
60
|
+
* @param value Value in square meters
|
|
61
|
+
* @returns Value in hectares
|
|
62
|
+
*/
|
|
63
|
+
export function squareMetersToHectares(value) {
|
|
64
|
+
return value * 0.0001;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Convert value from square meters to acres
|
|
68
|
+
* @param value Value in square meters
|
|
69
|
+
* @returns Value in acres
|
|
70
|
+
*/
|
|
71
|
+
export function squareMetersToAcres(value) {
|
|
72
|
+
return value * 0.00024711;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Convert value from meters to the specified length unit
|
|
76
|
+
* @param value Value in meters
|
|
77
|
+
* @param unit Length unit
|
|
78
|
+
* @returns Value in unit
|
|
79
|
+
*/
|
|
80
|
+
export function metersToUnit(value, unit) {
|
|
81
|
+
const conversionMapper = new Map([
|
|
82
|
+
[MeasureLengthUnit.Meters, (val) => val],
|
|
83
|
+
[MeasureLengthUnit.Kilometers, metersToKilometers],
|
|
84
|
+
[MeasureLengthUnit.Miles, metersToMiles],
|
|
85
|
+
[MeasureLengthUnit.Feet, metersToFeet],
|
|
86
|
+
]);
|
|
87
|
+
const conversion = conversionMapper.get(unit);
|
|
88
|
+
return conversion ? conversion(value) : undefined;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Convert value from square meters to the specified area unit
|
|
92
|
+
* @param value Value in meters
|
|
93
|
+
* @param unit Area unit
|
|
94
|
+
* @returns Value in unit
|
|
95
|
+
*/
|
|
96
|
+
export function squareMetersToUnit(value, unit) {
|
|
97
|
+
const conversionMapper = new Map([
|
|
98
|
+
[MeasureAreaUnit.SquareMeters, (val) => val],
|
|
99
|
+
[MeasureAreaUnit.SquareKilometers, squareMetersToSquareKilometers],
|
|
100
|
+
[MeasureAreaUnit.SquareMiles, squareMetersToSquareMiles],
|
|
101
|
+
[MeasureAreaUnit.SquareFeet, squareMetersToSquareFeet],
|
|
102
|
+
[MeasureAreaUnit.Hectares, squareMetersToHectares],
|
|
103
|
+
[MeasureAreaUnit.Acres, squareMetersToAcres],
|
|
104
|
+
]);
|
|
105
|
+
const conversion = conversionMapper.get(unit);
|
|
106
|
+
return conversion ? conversion(value) : undefined;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* This method format a measure to a readable format
|
|
110
|
+
* @param measure Measure
|
|
111
|
+
* @param options Formatting options
|
|
112
|
+
* @returns Formatted measure
|
|
113
|
+
*/
|
|
114
|
+
export function formatMeasure(measure, options, languageService) {
|
|
115
|
+
let decimal = options.decimal;
|
|
116
|
+
if (decimal === undefined || decimal < 0) {
|
|
117
|
+
decimal = 1;
|
|
118
|
+
}
|
|
119
|
+
const parts = [];
|
|
120
|
+
if (options.locale !== undefined) {
|
|
121
|
+
parts.push(measure.toLocaleString(options.locale, {
|
|
122
|
+
minimumFractionDigits: decimal,
|
|
123
|
+
maximumFractionDigits: decimal
|
|
124
|
+
}));
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
parts.push(measure.toFixed(decimal).toString());
|
|
128
|
+
}
|
|
129
|
+
if (options.unit !== undefined && options.unitAbbr === true) {
|
|
130
|
+
if (languageService) {
|
|
131
|
+
parts.push(MeasureLengthUnitAbbreviation[options.unit] ?
|
|
132
|
+
languageService.translate.instant('igo.geo.measure.' + MeasureLengthUnitAbbreviation[options.unit]) :
|
|
133
|
+
languageService.translate.instant('igo.geo.measure.' + MeasureAreaUnitAbbreviation[options.unit]));
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
parts.push(MeasureLengthUnitAbbreviation[options.unit] || MeasureAreaUnitAbbreviation[options.unit]);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return parts.filter(p => p !== undefined).join(' ');
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Compute best length measure unit for a given measure in meters
|
|
143
|
+
* @param value Value in meters
|
|
144
|
+
* @returns Measure unit
|
|
145
|
+
*/
|
|
146
|
+
export function computeBestLengthUnit(value) {
|
|
147
|
+
let unit = MeasureLengthUnit.Meters;
|
|
148
|
+
let converted = value;
|
|
149
|
+
const possibleUnits = [MeasureLengthUnit.Kilometers];
|
|
150
|
+
while (converted > 1000 && possibleUnits.length > 0) {
|
|
151
|
+
unit = possibleUnits.pop();
|
|
152
|
+
converted = metersToUnit(value, unit);
|
|
153
|
+
}
|
|
154
|
+
return unit;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Compute best length measure unit for a given measure in square meters
|
|
158
|
+
* @param value Value in meters
|
|
159
|
+
* @returns Measure unit
|
|
160
|
+
*/
|
|
161
|
+
export function computeBestAreaUnit(value) {
|
|
162
|
+
let unit = MeasureAreaUnit.SquareMeters;
|
|
163
|
+
let converted = value;
|
|
164
|
+
const possibleUnits = [MeasureAreaUnit.SquareKilometers];
|
|
165
|
+
while (converted > 1000000 && possibleUnits.length > 0) {
|
|
166
|
+
unit = possibleUnits.pop();
|
|
167
|
+
converted = squareMetersToUnit(value, unit);
|
|
168
|
+
}
|
|
169
|
+
return unit;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Create a default style for a measure interaction
|
|
173
|
+
* @returns OL style
|
|
174
|
+
*/
|
|
175
|
+
export function createMeasureInteractionStyle() {
|
|
176
|
+
return new olstyle.Style({
|
|
177
|
+
stroke: new olstyle.Stroke({
|
|
178
|
+
color: '#ffcc33',
|
|
179
|
+
lineDash: [10, 10],
|
|
180
|
+
width: 2
|
|
181
|
+
}),
|
|
182
|
+
fill: new olstyle.Fill({
|
|
183
|
+
color: 'rgba(255, 255, 255, 0.2)'
|
|
184
|
+
}),
|
|
185
|
+
image: new olstyle.Circle({
|
|
186
|
+
radius: 5,
|
|
187
|
+
stroke: new olstyle.Stroke({
|
|
188
|
+
color: '#ffcc33',
|
|
189
|
+
}),
|
|
190
|
+
fill: new olstyle.Fill({
|
|
191
|
+
color: 'rgba(255, 255, 255, 0.2)'
|
|
192
|
+
})
|
|
193
|
+
})
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Create a default style for a measure layer
|
|
198
|
+
* @returns OL style
|
|
199
|
+
*/
|
|
200
|
+
export function createMeasureLayerStyle() {
|
|
201
|
+
return new olstyle.Style({
|
|
202
|
+
stroke: new olstyle.Stroke({
|
|
203
|
+
color: '#ffcc33',
|
|
204
|
+
width: 2
|
|
205
|
+
}),
|
|
206
|
+
fill: new olstyle.Fill({
|
|
207
|
+
color: 'rgba(255, 255, 255, 0.2)'
|
|
208
|
+
})
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Compute the length in meters of an OL geometry with a given projection
|
|
213
|
+
* @param olGeometry Ol geometry
|
|
214
|
+
* @param projection olGeometry's projection
|
|
215
|
+
* @returns Length in meters
|
|
216
|
+
*/
|
|
217
|
+
export function measureOlGeometryLength(olGeometry, projection) {
|
|
218
|
+
if (olGeometry instanceof OlPoint) {
|
|
219
|
+
return undefined;
|
|
220
|
+
}
|
|
221
|
+
if (olGeometry.getFlatCoordinates().length === 0) {
|
|
222
|
+
return undefined;
|
|
223
|
+
}
|
|
224
|
+
return olGetLength(olGeometry, { projection });
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Compute the area in square meters of an OL geometry with a given projection
|
|
228
|
+
* @param olGeometry Ol geometry
|
|
229
|
+
* @param projection olGeometry's projection
|
|
230
|
+
* @returns Area in square meters
|
|
231
|
+
*/
|
|
232
|
+
export function measureOlGeometryArea(olGeometry, projection) {
|
|
233
|
+
if (olGeometry instanceof OlPoint || olGeometry instanceof OlLineString) {
|
|
234
|
+
return undefined;
|
|
235
|
+
}
|
|
236
|
+
if (olGeometry.getFlatCoordinates().length === 0) {
|
|
237
|
+
return undefined;
|
|
238
|
+
}
|
|
239
|
+
return olGetArea(olGeometry, { projection });
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Compute the area (square meters), length (meters) and last length (meters)
|
|
243
|
+
* of an OL geometry with a given projection.
|
|
244
|
+
* @param olGeometry Ol geometry
|
|
245
|
+
* @param projection olGeometry's projection
|
|
246
|
+
* @returns Computed measure
|
|
247
|
+
*/
|
|
248
|
+
export function measureOlGeometry(olGeometry, projection) {
|
|
249
|
+
const length = measureOlGeometryLength(olGeometry, projection);
|
|
250
|
+
const area = measureOlGeometryArea(olGeometry, projection);
|
|
251
|
+
const lengths = [];
|
|
252
|
+
const coordinates = olGeometry.getFlatCoordinates();
|
|
253
|
+
const coordinatesLength = coordinates.length;
|
|
254
|
+
for (let i = 0; i <= coordinatesLength - 4; i += 2) {
|
|
255
|
+
const olSegment = new OlLineString([
|
|
256
|
+
[coordinates[i], coordinates[i + 1]],
|
|
257
|
+
[coordinates[i + 2], coordinates[i + 3]]
|
|
258
|
+
]);
|
|
259
|
+
lengths.push(measureOlGeometryLength(olSegment, projection));
|
|
260
|
+
}
|
|
261
|
+
return {
|
|
262
|
+
area,
|
|
263
|
+
length,
|
|
264
|
+
lengths
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Update an OL geometry midpoints and return an array of those points
|
|
269
|
+
* @param olGeometry OL Geometry
|
|
270
|
+
* @returns OL points
|
|
271
|
+
*/
|
|
272
|
+
export function updateOlGeometryMidpoints(olGeometry) {
|
|
273
|
+
let olMidpoints;
|
|
274
|
+
if (olGeometry instanceof OlPoint) {
|
|
275
|
+
const olMidpointPoint = new OlPoint(olGeometry.getFlatCoordinates());
|
|
276
|
+
olMidpoints = new Array(1);
|
|
277
|
+
olMidpoints[0] = olMidpointPoint;
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
olMidpoints = getOlGeometryMidpoints(olGeometry);
|
|
281
|
+
// TODO: handle multi geometries
|
|
282
|
+
const coordinates = olGeometry.getFlatCoordinates();
|
|
283
|
+
const midpointsLength = olMidpoints.length;
|
|
284
|
+
for (let i = 0; i < midpointsLength; i++) {
|
|
285
|
+
const j = i * 2;
|
|
286
|
+
const olSegment = new OlLineString([
|
|
287
|
+
[coordinates[j], coordinates[j + 1]],
|
|
288
|
+
[coordinates[j + 2], coordinates[j + 3]]
|
|
289
|
+
]);
|
|
290
|
+
const midpointCoordinate = olSegment.getCoordinateAt(0.5);
|
|
291
|
+
const olMidpoint = olMidpoints[i];
|
|
292
|
+
if (olMidpoint !== undefined) {
|
|
293
|
+
olMidpoint.setCoordinates(midpointCoordinate);
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
olMidpoints[i] = new OlPoint(midpointCoordinate);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
return olMidpoints;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Clear an OL geometry midpoints and return an array of those points
|
|
304
|
+
* @param olGeometry OL Geometry
|
|
305
|
+
*/
|
|
306
|
+
export function clearOlGeometryMidpoints(olGeometry) {
|
|
307
|
+
const olMidpoints = olGeometry.get('_midpoints') || [];
|
|
308
|
+
const midpointsLength = olMidpoints.length;
|
|
309
|
+
for (let i = 0; i < midpointsLength; i++) {
|
|
310
|
+
const olMidpoint = olMidpoints[i];
|
|
311
|
+
if (olMidpoint !== undefined) {
|
|
312
|
+
if (olMidpoint !== undefined) {
|
|
313
|
+
clearOlMidpointTooltip(olMidpoint);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
olGeometry.set('_midpoints', undefined, true);
|
|
318
|
+
return olMidpoints;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Return an array of OL geometry midpoints, if any
|
|
322
|
+
* @param olGeometry OL Geometry
|
|
323
|
+
* @returns OL points
|
|
324
|
+
*/
|
|
325
|
+
function getOlGeometryMidpoints(olGeometry) {
|
|
326
|
+
let expectedNumber;
|
|
327
|
+
if (olGeometry instanceof OlCircle) {
|
|
328
|
+
expectedNumber = 0;
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
expectedNumber = Math.max((olGeometry.getFlatCoordinates().length / 2) - 1, 0);
|
|
332
|
+
}
|
|
333
|
+
// TODO: This works but it's quite messy. If time permits,
|
|
334
|
+
// clean this. Maybe a Tooltip class could handle that
|
|
335
|
+
let olMidpoints = olGeometry.get('_midpoints');
|
|
336
|
+
if (olMidpoints === undefined) {
|
|
337
|
+
if (olGeometry instanceof OlPoint) {
|
|
338
|
+
olMidpoints = new Array(1);
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
olMidpoints = new Array(expectedNumber);
|
|
342
|
+
}
|
|
343
|
+
olGeometry.set('_midpoints', olMidpoints, true);
|
|
344
|
+
return olMidpoints;
|
|
345
|
+
}
|
|
346
|
+
if (expectedNumber === 0) {
|
|
347
|
+
return olMidpoints;
|
|
348
|
+
}
|
|
349
|
+
if (expectedNumber === olMidpoints.length) {
|
|
350
|
+
return olMidpoints;
|
|
351
|
+
}
|
|
352
|
+
if (expectedNumber > olMidpoints.length) {
|
|
353
|
+
olMidpoints.push(...new Array(expectedNumber - olMidpoints.length));
|
|
354
|
+
return olMidpoints;
|
|
355
|
+
}
|
|
356
|
+
for (let i = expectedNumber; i < olMidpoints.length; i++) {
|
|
357
|
+
const olMidpoint = olMidpoints[expectedNumber];
|
|
358
|
+
if (olMidpoint !== undefined) {
|
|
359
|
+
clearOlMidpointTooltip(olMidpoint);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
olMidpoints.splice(expectedNumber);
|
|
363
|
+
return olMidpoints;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Remove an OL midpoint's tooltip from the map
|
|
367
|
+
* @param olMidpoint OL Point
|
|
368
|
+
*/
|
|
369
|
+
function clearOlMidpointTooltip(olMidpoint) {
|
|
370
|
+
const olTooltip = olMidpoint.get('_tooltip');
|
|
371
|
+
if (olTooltip !== undefined) {
|
|
372
|
+
const olMap = olTooltip.getMap();
|
|
373
|
+
if (olMap !== undefined) {
|
|
374
|
+
olMap.removeOverlay(olTooltip);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Add an OL overlay at each midpoint and return an array of those overlays
|
|
380
|
+
* @param olGeometry OL Geometry
|
|
381
|
+
* @returns OL overlays
|
|
382
|
+
*/
|
|
383
|
+
export function updateOlTooltipsAtMidpoints(olGeometry) {
|
|
384
|
+
const olMidpoints = updateOlGeometryMidpoints(olGeometry);
|
|
385
|
+
let typeGeom = '';
|
|
386
|
+
if (olGeometry instanceof OlLineString) {
|
|
387
|
+
typeGeom = 'line-';
|
|
388
|
+
}
|
|
389
|
+
else if (olGeometry instanceof OlPolygon) {
|
|
390
|
+
typeGeom = 'polygone-';
|
|
391
|
+
}
|
|
392
|
+
const olTooltips = olMidpoints.map((olMidpoint) => {
|
|
393
|
+
let olTooltip = olMidpoint.get('_tooltip');
|
|
394
|
+
if (olTooltip === undefined) {
|
|
395
|
+
olTooltip = createOlTooltipAtPoint(olMidpoint, false, typeGeom);
|
|
396
|
+
}
|
|
397
|
+
else {
|
|
398
|
+
olTooltip.setPosition(olMidpoint.getFlatCoordinates());
|
|
399
|
+
}
|
|
400
|
+
return olTooltip;
|
|
401
|
+
});
|
|
402
|
+
return olTooltips;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Return an array of OL overlay at midspoints, if any
|
|
406
|
+
* @param olGeometry OL Geometry
|
|
407
|
+
* @returns OL overlays
|
|
408
|
+
*/
|
|
409
|
+
export function getOlTooltipsAtMidpoints(olGeometry) {
|
|
410
|
+
const olMidpoints = getOlGeometryMidpoints(olGeometry);
|
|
411
|
+
return olMidpoints.map((olMidpoint) => {
|
|
412
|
+
return olMidpoint ? olMidpoint.get('_tooltip') : undefined;
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Update an OL geometry center and return it
|
|
417
|
+
* @param olGeometry OL Geometry
|
|
418
|
+
* @returns OL point
|
|
419
|
+
*/
|
|
420
|
+
export function updateOlGeometryCenter(olGeometry) {
|
|
421
|
+
let olCenter = olGeometry.get('_center');
|
|
422
|
+
const centerCoordinate = olGetCenter(olGeometry.getExtent());
|
|
423
|
+
if (olCenter !== undefined) {
|
|
424
|
+
olCenter.setCoordinates(centerCoordinate);
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
olCenter = new OlPoint(centerCoordinate);
|
|
428
|
+
olGeometry.set('_center', olCenter);
|
|
429
|
+
}
|
|
430
|
+
return olCenter;
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Add an OL overlay at the center of a geometry and return that overlay
|
|
434
|
+
* @param olGeometry OL Geometry
|
|
435
|
+
* @returns OL overlay
|
|
436
|
+
*/
|
|
437
|
+
export function updateOlTooltipAtCenter(olGeometry) {
|
|
438
|
+
const olCenter = updateOlGeometryCenter(olGeometry);
|
|
439
|
+
let olTooltip = olCenter.get('_tooltip');
|
|
440
|
+
if (olTooltip === undefined) {
|
|
441
|
+
olTooltip = createOlTooltipAtPoint(olCenter, true);
|
|
442
|
+
}
|
|
443
|
+
else {
|
|
444
|
+
olTooltip.setPosition(olCenter.getFlatCoordinates());
|
|
445
|
+
}
|
|
446
|
+
return olTooltip;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Return an array of OL overlay at midspoints, if any
|
|
450
|
+
* @param olGeometry OL Geometry
|
|
451
|
+
* @returns OL overlays
|
|
452
|
+
*/
|
|
453
|
+
export function getOlTooltipAtCenter(olGeometry) {
|
|
454
|
+
const olCenter = olGeometry.get('_center');
|
|
455
|
+
return olCenter ? olCenter.get('_tooltip') : undefined;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* Get all the tooltips of an OL geometry
|
|
459
|
+
* @param olGeometry OL Geometry
|
|
460
|
+
* @returns OL overlays
|
|
461
|
+
*/
|
|
462
|
+
export function getTooltipsOfOlGeometry(olGeometry) {
|
|
463
|
+
const olTooltips = [].concat(getOlTooltipsAtMidpoints(olGeometry) || []);
|
|
464
|
+
const olCenterTooltip = getOlTooltipAtCenter(olGeometry);
|
|
465
|
+
if (olCenterTooltip !== undefined) {
|
|
466
|
+
olTooltips.push(olCenterTooltip);
|
|
467
|
+
}
|
|
468
|
+
return olTooltips;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Create an OL overlay at a point and bind the overlay to the point
|
|
472
|
+
* @param olPoint OL Point
|
|
473
|
+
* @returns OL overlay
|
|
474
|
+
*/
|
|
475
|
+
export function createOlTooltipAtPoint(olPoint, center = false, srcGeomType = '') {
|
|
476
|
+
const olTooltip = new OlOverlay({
|
|
477
|
+
element: document.createElement('div'),
|
|
478
|
+
offset: [-30, -10],
|
|
479
|
+
className: (center ?
|
|
480
|
+
['igo-map-tooltip',
|
|
481
|
+
'igo-map-tooltip-measure', 'igo-map-tooltip-measure-area'] : ['igo-map-tooltip', 'igo-map-tooltip-measure',
|
|
482
|
+
`igo-map-tooltip-measure-${srcGeomType}segments`]).join(' '),
|
|
483
|
+
stopEvent: false
|
|
484
|
+
});
|
|
485
|
+
olTooltip.setPosition(olPoint.getFlatCoordinates());
|
|
486
|
+
olPoint.set('_tooltip', olTooltip);
|
|
487
|
+
return olTooltip;
|
|
488
|
+
}
|
|
489
489
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVhc3VyZS51dGlscy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzI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