diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index e6aa30c3597..065c60d56f6 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -1 +1,2 @@ // = require_tree . +// = require ol diff --git a/app/assets/stylesheets/te_fenua.scss b/app/assets/stylesheets/te_fenua.scss index 06352eb1edc..1f50036e311 100644 --- a/app/assets/stylesheets/te_fenua.scss +++ b/app/assets/stylesheets/te_fenua.scss @@ -1,3 +1,5 @@ +// MES CONTRROLES + .ol-control-add { left: 0.5em; top: 5em; @@ -18,6 +20,8 @@ .te-fenua { position: relative; + width: 100%; + height: 500px; } .te-fenua-header { @@ -28,12 +32,16 @@ background-color: rgba(0, 60, 136, 0.7); border-radius: 5px; left: 4em; - padding: 2px 2px 2px 2px; + padding: 5px 5px 5px 5px; position: absolute; right: 4em; top: 0.4em; z-index: 20; + input { + padding: 10px 10px 10px 10px; + width: 100%; + } } .te-fenua-help { diff --git a/app/components/editable_champ/te_fenua_component/te_fenua_component.html.haml b/app/components/editable_champ/te_fenua_component/te_fenua_component.html.haml index ad6d8e433b2..1e3abf8ddea 100644 --- a/app/components/editable_champ/te_fenua_component/te_fenua_component.html.haml +++ b/app/components/editable_champ/te_fenua_component/te_fenua_component.html.haml @@ -1,6 +1,6 @@ .te-fenua.edit{ class: "te-fenua-#{@form.index}", data: { entry: @champ.entry, marker: image_url('marker-icon.png') } } - .place - %input{ data: { te_fenua_place: true, autocomplete: 'te_fenua' }, placeholder: 'Hopital Raiatea, Eglise Faaone, K210 Pirae', 'aria-label': 'Adresse' } + -# .place + -# %input{ data: { te_fenua_place: true, autocomplete: 'te_fenua' }, placeholder: 'Hopital Raiatea, Eglise Faaone, K210 Pirae', 'aria-label': 'Adresse' } .te-fenua-help.add %p Pour ajouter une zone. diff --git a/app/javascript/new_design/champs/te_fenua.js b/app/javascript/new_design/champs/te_fenua.js index 8567b42a64d..f42a5d81546 100644 --- a/app/javascript/new_design/champs/te_fenua.js +++ b/app/javascript/new_design/champs/te_fenua.js @@ -2,7 +2,7 @@ import { createBatimentLayer, createDefaultMap, createManualZoneLayer, - createMarkerFeature, + // createMarkerFeature, createMarkerLayer, createParcelleLayer, createTeFenuaLayer, @@ -15,7 +15,7 @@ import Select from 'ol/interaction/Select.js'; import { GeoJSON } from 'ol/format'; import Geolocation from 'ol/Geolocation'; import Control from 'ol/control/Control'; -import { delegate } from '../../shared/utils'; +// import { delegate } from '../../shared/utils'; import { createEmpty as olCreateEmpty, extend as olExtend, @@ -41,28 +41,28 @@ async function initialize() { } } - delegate('autocomplete:select', '[data-te-fenua-place]', (event) => { - let map = getMapFromAddress(event.target); - if (map) { - if (event.detail.extent) fitExtent(map, event.detail.extent); - else if (event.detail.point) moveMapTo(map, event.detail.point); - if (event.detail.point) { - const marker = createMarkerFeature(event.detail.point); - map.markerLayer.getSource().addFeature(marker); - } - } - }); + // delegate('change', '[data-te-fenua-place]', (event) => { + // let map = getMapFromAddress(event.target); + // if (map) { + // if (event.detail.extent) fitExtent(map, event.detail.extent); + // else if (event.detail.point) moveMapTo(map, event.detail.point); + // if (event.detail.point) { + // const marker = createMarkerFeature(event.detail.point); + // map.markerLayer.getSource().addFeature(marker); + // } + // } + // }); } function getInputFromMap(mapElement) { return mapElement.parentElement.querySelector('input.features'); } -function getMapFromAddress(element) { - element = element.closest('.te-fenua'); - return MAPS.get(element); -} - +// function getMapFromAddress(element) { +// element = element.closest('.te-fenua'); +// return MAPS.get(element); +// } +// // We load leaflet dynamically, ramda and freedraw and assign them to globals. // Latest freedraw version build needs globals. // async function loadOpenLayers(editable) { @@ -151,9 +151,9 @@ function centerMap(map) { else fitExtent(map, extent); } -function moveMapTo(map, point) { - map.getView().animate({ center: point }); -} +// function moveMapTo(map, point) { +// map.getView().animate({ center: point }); +// } function fitExtent(map, extent) { let view = map.getView(); diff --git a/app/javascript/new_design/champs/te_fenua_lib.js b/app/javascript/new_design/champs/te_fenua_lib.js index 8db218122c1..5367fd9ef59 100644 --- a/app/javascript/new_design/champs/te_fenua_lib.js +++ b/app/javascript/new_design/champs/te_fenua_lib.js @@ -208,7 +208,7 @@ function createParcellePolygonStyle() { function getFeatureInfo(coordinate, resolution, projection, params) { const url = new TileWMS({ url: 'https://www.tefenua.gov.pf/api/wms' - }).getGetFeatureInfoUrl(coordinate, resolution, projection, params); + }).getFeatureInfoUrl(coordinate, resolution, projection, params); return fetch(url).then((result) => { return result.json(); }); diff --git a/app/lib/api_te_fenua/adapter.rb b/app/lib/api_te_fenua/adapter.rb index f0f391bfb23..bfcdecd6b79 100644 --- a/app/lib/api_te_fenua/adapter.rb +++ b/app/lib/api_te_fenua/adapter.rb @@ -13,7 +13,7 @@ def features def get_features response = self.class.search(@address) result = JSON.parse(response, symbolize_names: true) - result[:content] + result[:content][:hits][:hits] rescue RestClient::Exception, JSON::ParserError, TypeError @blank_return end @@ -36,7 +36,7 @@ def self.search(search) search_url = [API_TE_FENUA_URL, "recherche"].join("/") RestClient::Request.execute(method: :get, url: search_url, - timeout: 8, + timeout: 68, headers: { params: { # mandatory but unused parameters diff --git a/app/models/types_de_champ/te_fenua_type_de_champ.rb b/app/models/types_de_champ/te_fenua_type_de_champ.rb index a862a49c462..f94184617d2 100644 --- a/app/models/types_de_champ/te_fenua_type_de_champ.rb +++ b/app/models/types_de_champ/te_fenua_type_de_champ.rb @@ -1,3 +1,3 @@ class TypesDeChamp::TeFenuaTypeDeChamp < TypesDeChamp::TypeDeChampBase - LAYERS = [:parcelles, :batiments, :zones_manuelles] + LAYERS = [:parcelles, :zones_manuelles] # , :batiments end diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index fcf51bd6ae3..8acf2b47cfc 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -16,6 +16,7 @@ Rails.application.config.assets.paths << Rails.root.join('node_modules', 'mapbox-gl', 'dist') Rails.application.config.assets.paths << Rails.root.join('node_modules', '@reach', 'combobox') Rails.application.config.assets.paths << Rails.root.join('node_modules', '@mapbox', 'mapbox-gl-draw', 'dist') +Rails.application.config.assets.paths << Rails.root.join('node_modules', 'ol') # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in the app/assets diff --git a/package.json b/package.json index 239ef060b70..c45edfaf22d 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "is-hotkey": "^0.2.0", "maplibre-gl": "^1.15.2", "match-sorter": "^6.2.0", - "ol": "^5.3.3", + "ol": "^8.1.0", "patch-package": "^7.0.0", "react": "^18.2.0", "react-coordinate-input": "^1.0.0", diff --git a/vendor/assets/stylesheets/leaflet.scss b/vendor/assets/stylesheets/leaflet.scss deleted file mode 100644 index 70802f36874..00000000000 --- a/vendor/assets/stylesheets/leaflet.scss +++ /dev/null @@ -1,635 +0,0 @@ -/* required styles */ - -.leaflet-pane, -.leaflet-tile, -.leaflet-marker-icon, -.leaflet-marker-shadow, -.leaflet-tile-container, -.leaflet-pane > svg, -.leaflet-pane > canvas, -.leaflet-zoom-box, -.leaflet-image-layer, -.leaflet-layer { - position: absolute; - left: 0; - top: 0; - } -.leaflet-container { - overflow: hidden; - } -.leaflet-tile, -.leaflet-marker-icon, -.leaflet-marker-shadow { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; - -webkit-user-drag: none; - } -/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ -.leaflet-safari .leaflet-tile { - image-rendering: -webkit-optimize-contrast; - } -/* hack that prevents hw layers "stretching" when loading new tiles */ -.leaflet-safari .leaflet-tile-container { - width: 1600px; - height: 1600px; - -webkit-transform-origin: 0 0; - } -.leaflet-marker-icon, -.leaflet-marker-shadow { - display: block; - } -/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ -/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ -.leaflet-container .leaflet-overlay-pane svg, -.leaflet-container .leaflet-marker-pane img, -.leaflet-container .leaflet-shadow-pane img, -.leaflet-container .leaflet-tile-pane img, -.leaflet-container img.leaflet-image-layer, -.leaflet-container .leaflet-tile { - max-width: none !important; - max-height: none !important; - } - -.leaflet-container.leaflet-touch-zoom { - -ms-touch-action: pan-x pan-y; - touch-action: pan-x pan-y; - } -.leaflet-container.leaflet-touch-drag { - -ms-touch-action: pinch-zoom; - /* Fallback for FF which doesn't support pinch-zoom */ - touch-action: none; - touch-action: pinch-zoom; -} -.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { - -ms-touch-action: none; - touch-action: none; -} -.leaflet-container { - -webkit-tap-highlight-color: transparent; -} -.leaflet-container a { - -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4); -} -.leaflet-tile { - filter: inherit; - visibility: hidden; - } -.leaflet-tile-loaded { - visibility: inherit; - } -.leaflet-zoom-box { - width: 0; - height: 0; - -moz-box-sizing: border-box; - box-sizing: border-box; - z-index: 800; - } -/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ -.leaflet-overlay-pane svg { - -moz-user-select: none; - } - -.leaflet-pane { z-index: 400; } - -.leaflet-tile-pane { z-index: 200; } -.leaflet-overlay-pane { z-index: 400; } -.leaflet-shadow-pane { z-index: 500; } -.leaflet-marker-pane { z-index: 600; } -.leaflet-tooltip-pane { z-index: 650; } -.leaflet-popup-pane { z-index: 700; } - -.leaflet-map-pane canvas { z-index: 100; } -.leaflet-map-pane svg { z-index: 200; } - -.leaflet-vml-shape { - width: 1px; - height: 1px; - } -.lvml { - behavior: url(#default#VML); - display: inline-block; - position: absolute; - } - - -/* control positioning */ - -.leaflet-control { - position: relative; - z-index: 800; - pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ - pointer-events: auto; - } -.leaflet-top, -.leaflet-bottom { - position: absolute; - z-index: 1000; - pointer-events: none; - } -.leaflet-top { - top: 0; - } -.leaflet-right { - right: 0; - } -.leaflet-bottom { - bottom: 0; - } -.leaflet-left { - left: 0; - } -.leaflet-control { - float: left; - clear: both; - } -.leaflet-right .leaflet-control { - float: right; - } -.leaflet-top .leaflet-control { - margin-top: 10px; - } -.leaflet-bottom .leaflet-control { - margin-bottom: 10px; - } -.leaflet-left .leaflet-control { - margin-left: 10px; - } -.leaflet-right .leaflet-control { - margin-right: 10px; - } - - -/* zoom and fade animations */ - -.leaflet-fade-anim .leaflet-tile { - will-change: opacity; - } -.leaflet-fade-anim .leaflet-popup { - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; - } -.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { - opacity: 1; - } -.leaflet-zoom-animated { - -webkit-transform-origin: 0 0; - -ms-transform-origin: 0 0; - transform-origin: 0 0; - } -.leaflet-zoom-anim .leaflet-zoom-animated { - will-change: transform; - } -.leaflet-zoom-anim .leaflet-zoom-animated { - -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); - -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); - transition: transform 0.25s cubic-bezier(0,0,0.25,1); - } -.leaflet-zoom-anim .leaflet-tile, -.leaflet-pan-anim .leaflet-tile { - -webkit-transition: none; - -moz-transition: none; - transition: none; - } - -.leaflet-zoom-anim .leaflet-zoom-hide { - visibility: hidden; - } - - -/* cursors */ - -.leaflet-interactive { - cursor: pointer; - } -.leaflet-grab { - cursor: -webkit-grab; - cursor: -moz-grab; - cursor: grab; - } -.leaflet-crosshair, -.leaflet-crosshair .leaflet-interactive { - cursor: crosshair; - } -.leaflet-popup-pane, -.leaflet-control { - cursor: auto; - } -.leaflet-dragging .leaflet-grab, -.leaflet-dragging .leaflet-grab .leaflet-interactive, -.leaflet-dragging .leaflet-marker-draggable { - cursor: move; - cursor: -webkit-grabbing; - cursor: -moz-grabbing; - cursor: grabbing; - } - -/* marker & overlays interactivity */ -.leaflet-marker-icon, -.leaflet-marker-shadow, -.leaflet-image-layer, -.leaflet-pane > svg path, -.leaflet-tile-container { - pointer-events: none; - } - -.leaflet-marker-icon.leaflet-interactive, -.leaflet-image-layer.leaflet-interactive, -.leaflet-pane > svg path.leaflet-interactive { - pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ - pointer-events: auto; - } - -/* visual tweaks */ - -.leaflet-container { - background: #ddd; - outline: 0; - } -.leaflet-container a { - color: #0078A8; - } -.leaflet-container a.leaflet-active { - outline: 2px solid orange; - } -.leaflet-zoom-box { - border: 2px dotted #38f; - background: rgba(255,255,255,0.5); - } - - -/* general typography */ -.leaflet-container { - font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; - } - - -/* general toolbar styles */ - -.leaflet-bar { - box-shadow: 0 1px 5px rgba(0,0,0,0.65); - border-radius: 4px; - } -.leaflet-bar a, -.leaflet-bar a:hover { - background-color: #fff; - border-bottom: 1px solid #ccc; - width: 26px; - height: 26px; - line-height: 26px; - display: block; - text-align: center; - text-decoration: none; - color: black; - } -.leaflet-bar a, -.leaflet-control-layers-toggle { - background-position: 50% 50%; - background-repeat: no-repeat; - display: block; - } -.leaflet-bar a:hover { - background-color: #f4f4f4; - } -.leaflet-bar a:first-child { - border-top-left-radius: 4px; - border-top-right-radius: 4px; - } -.leaflet-bar a:last-child { - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-bottom: none; - } -.leaflet-bar a.leaflet-disabled { - cursor: default; - background-color: #f4f4f4; - color: #bbb; - } - -.leaflet-touch .leaflet-bar a { - width: 30px; - height: 30px; - line-height: 30px; - } -.leaflet-touch .leaflet-bar a:first-child { - border-top-left-radius: 2px; - border-top-right-radius: 2px; - } -.leaflet-touch .leaflet-bar a:last-child { - border-bottom-left-radius: 2px; - border-bottom-right-radius: 2px; - } - -/* zoom control */ - -.leaflet-control-zoom-in, -.leaflet-control-zoom-out { - font: bold 18px 'Lucida Console', Monaco, monospace; - text-indent: 1px; - } - -.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out { - font-size: 22px; - } - - -/* layers control */ - -.leaflet-control-layers { - box-shadow: 0 1px 5px rgba(0,0,0,0.4); - background: #fff; - border-radius: 5px; - } -.leaflet-control-layers-toggle { - background-image: url(images/layers.png); - width: 36px; - height: 36px; - } -.leaflet-retina .leaflet-control-layers-toggle { - background-image: url(images/layers-2x.png); - background-size: 26px 26px; - } -.leaflet-touch .leaflet-control-layers-toggle { - width: 44px; - height: 44px; - } -.leaflet-control-layers .leaflet-control-layers-list, -.leaflet-control-layers-expanded .leaflet-control-layers-toggle { - display: none; - } -.leaflet-control-layers-expanded .leaflet-control-layers-list { - display: block; - position: relative; - } -.leaflet-control-layers-expanded { - padding: 6px 10px 6px 6px; - color: #333; - background: #fff; - } -.leaflet-control-layers-scrollbar { - overflow-y: scroll; - overflow-x: hidden; - padding-right: 5px; - } -.leaflet-control-layers-selector { - margin-top: 2px; - position: relative; - top: 1px; - } -.leaflet-control-layers label { - display: block; - } -.leaflet-control-layers-separator { - height: 0; - border-top: 1px solid #ddd; - margin: 5px -10px 5px -6px; - } - -/* Default icon URLs */ -.leaflet-default-icon-path { - background-image: url(images/marker-icon.png); - } - - -/* attribution and scale controls */ - -.leaflet-container .leaflet-control-attribution { - background: #fff; - background: rgba(255, 255, 255, 0.7); - margin: 0; - } -.leaflet-control-attribution, -.leaflet-control-scale-line { - padding: 0 5px; - color: #333; - } -.leaflet-control-attribution a { - text-decoration: none; - } -.leaflet-control-attribution a:hover { - text-decoration: underline; - } -.leaflet-container .leaflet-control-attribution, -.leaflet-container .leaflet-control-scale { - font-size: 11px; - } -.leaflet-left .leaflet-control-scale { - margin-left: 5px; - } -.leaflet-bottom .leaflet-control-scale { - margin-bottom: 5px; - } -.leaflet-control-scale-line { - border: 2px solid #777; - border-top: none; - line-height: 1.1; - padding: 2px 5px 1px; - font-size: 11px; - white-space: nowrap; - overflow: hidden; - -moz-box-sizing: border-box; - box-sizing: border-box; - - background: #fff; - background: rgba(255, 255, 255, 0.5); - } -.leaflet-control-scale-line:not(:first-child) { - border-top: 2px solid #777; - border-bottom: none; - margin-top: -2px; - } -.leaflet-control-scale-line:not(:first-child):not(:last-child) { - border-bottom: 2px solid #777; - } - -.leaflet-touch .leaflet-control-attribution, -.leaflet-touch .leaflet-control-layers, -.leaflet-touch .leaflet-bar { - box-shadow: none; - } -.leaflet-touch .leaflet-control-layers, -.leaflet-touch .leaflet-bar { - border: 2px solid rgba(0,0,0,0.2); - background-clip: padding-box; - } - - -/* popup */ - -.leaflet-popup { - position: absolute; - text-align: center; - margin-bottom: 20px; - } -.leaflet-popup-content-wrapper { - padding: 1px; - text-align: left; - border-radius: 12px; - } -.leaflet-popup-content { - margin: 13px 19px; - line-height: 1.4; - } -.leaflet-popup-content p { - margin: 18px 0; - } -.leaflet-popup-tip-container { - width: 40px; - height: 20px; - position: absolute; - left: 50%; - margin-left: -20px; - overflow: hidden; - pointer-events: none; - } -.leaflet-popup-tip { - width: 17px; - height: 17px; - padding: 1px; - - margin: -10px auto 0; - - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -ms-transform: rotate(45deg); - transform: rotate(45deg); - } -.leaflet-popup-content-wrapper, -.leaflet-popup-tip { - background: white; - color: #333; - box-shadow: 0 3px 14px rgba(0,0,0,0.4); - } -.leaflet-container a.leaflet-popup-close-button { - position: absolute; - top: 0; - right: 0; - padding: 4px 4px 0 0; - border: none; - text-align: center; - width: 18px; - height: 14px; - font: 16px/14px Tahoma, Verdana, sans-serif; - color: #c3c3c3; - text-decoration: none; - font-weight: bold; - background: transparent; - } -.leaflet-container a.leaflet-popup-close-button:hover { - color: #999; - } -.leaflet-popup-scrolled { - overflow: auto; - border-bottom: 1px solid #ddd; - border-top: 1px solid #ddd; - } - -.leaflet-oldie .leaflet-popup-content-wrapper { - zoom: 1; - } -.leaflet-oldie .leaflet-popup-tip { - width: 24px; - margin: 0 auto; - - -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; - filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); - } -.leaflet-oldie .leaflet-popup-tip-container { - margin-top: -1px; - } - -.leaflet-oldie .leaflet-control-zoom, -.leaflet-oldie .leaflet-control-layers, -.leaflet-oldie .leaflet-popup-content-wrapper, -.leaflet-oldie .leaflet-popup-tip { - border: 1px solid #999; - } - - -/* div icon */ - -.leaflet-div-icon { - background: #fff; - border: 1px solid #666; - } - - -/* Tooltip */ -/* Base styles for the element that has a tooltip */ -.leaflet-tooltip { - position: absolute; - padding: 6px; - background-color: #fff; - border: 1px solid #fff; - border-radius: 3px; - color: #222; - white-space: nowrap; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - pointer-events: none; - box-shadow: 0 1px 3px rgba(0,0,0,0.4); - } -.leaflet-tooltip.leaflet-clickable { - cursor: pointer; - pointer-events: auto; - } -.leaflet-tooltip-top:before, -.leaflet-tooltip-bottom:before, -.leaflet-tooltip-left:before, -.leaflet-tooltip-right:before { - position: absolute; - pointer-events: none; - border: 6px solid transparent; - background: transparent; - content: ""; - } - -/* Directions */ - -.leaflet-tooltip-bottom { - margin-top: 6px; -} -.leaflet-tooltip-top { - margin-top: -6px; -} -.leaflet-tooltip-bottom:before, -.leaflet-tooltip-top:before { - left: 50%; - margin-left: -6px; - } -.leaflet-tooltip-top:before { - bottom: 0; - margin-bottom: -12px; - border-top-color: #fff; - } -.leaflet-tooltip-bottom:before { - top: 0; - margin-top: -12px; - margin-left: -6px; - border-bottom-color: #fff; - } -.leaflet-tooltip-left { - margin-left: -6px; -} -.leaflet-tooltip-right { - margin-left: 6px; -} -.leaflet-tooltip-left:before, -.leaflet-tooltip-right:before { - top: 50%; - margin-top: -6px; - } -.leaflet-tooltip-left:before { - right: 0; - margin-right: -12px; - border-left-color: #fff; - } -.leaflet-tooltip-right:before { - left: 0; - margin-left: -12px; - border-right-color: #fff; - } diff --git a/vendor/assets/stylesheets/ol.scss b/vendor/assets/stylesheets/ol.scss deleted file mode 100644 index 65603b7c473..00000000000 --- a/vendor/assets/stylesheets/ol.scss +++ /dev/null @@ -1,290 +0,0 @@ -.ol-box { - border: 2px solid #00f; - border-radius: 2px; - box-sizing: border-box; -} - -.ol-mouse-position { - position: absolute; - right: 8px; - top: 8px; -} - -.ol-scale-line { - background: rgba(0,60,136,0.3); - border-radius: 4px; - bottom: 8px; - left: 8px; - padding: 2px; - position: absolute; -} - -.ol-scale-line-inner { - border: 1px solid #eee; - border-top: 0; - color: #eee; - font-size: 10px; - margin: 1px; - text-align: center; - will-change: contents, width; -} - -.ol-overlay-container { - will-change: left,right,top,bottom; -} - -.ol-unsupported { - display: none; -} - -.ol-viewport, .ol-unselectable { - -moz-user-select: none; - -ms-user-select: none; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-touch-callout: none; - -webkit-user-select: none; - user-select: none; -} - -.ol-selectable { - -moz-user-select: text; - -ms-user-select: text; - -webkit-touch-callout: default; - -webkit-user-select: text; - user-select: text; -} - -.ol-grabbing { - cursor: -webkit-grabbing; - cursor: -moz-grabbing; - cursor: grabbing; -} - -.ol-grab { - cursor: move; - cursor: -webkit-grab; - cursor: -moz-grab; - cursor: grab; -} - -.ol-control { - background-color: rgba(255,255,255,0.4); - border-radius: 4px; - padding: 2px; - position: absolute; -} - -.ol-control:hover { - background-color: rgba(255,255,255,0.6); -} - -.ol-zoom { - left: .5em; - top: .5em; -} - -.ol-rotate { - right: .5em; - top: .5em; - transition: opacity .25s linear, visibility 0s linear; -} - -.ol-rotate.ol-hidden { - opacity: 0; - transition: opacity .25s linear, visibility 0s linear .25s; - visibility: hidden; -} - -.ol-zoom-extent { - left: .5em; - top: 4.643em; -} - -.ol-full-screen { - right: .5em; - top: .5em; -} - -@media print { - .ol-control { - display: none; - } -} - -.ol-control button { - background-color: rgba(0,60,136,0.5); - border: 0; - border-radius: 2px; - color: #fff; - display: block; - font-size: 1.14em; - font-weight: bold; - height: 1.375em; - line-height: .4em; - margin: 1px; - padding: 0; - text-align: center; - text-decoration: none; - width: 1.375em; -} - -.ol-control button::-moz-focus-inner { - border: 0; - padding: 0; -} - -.ol-zoom-extent button { - line-height: 1.4em; -} - -.ol-compass { - display: block; - font-size: 1.2em; - font-weight: normal; - will-change: transform; -} - -.ol-touch .ol-control button { - font-size: 1.5em; -} - -.ol-touch .ol-zoom-extent { - top: 5.5em; -} - -.ol-control button:hover, -.ol-control button:focus { - background-color: rgba(0,60,136,0.7); - text-decoration: none; -} - -.ol-zoom .ol-zoom-in { - border-radius: 2px 2px 0 0; -} - -.ol-zoom .ol-zoom-out { - border-radius: 0 0 2px 2px; -} - - -.ol-attribution { - bottom: .5em; - max-width: calc(100% - 1.3em); - right: .5em; - text-align: right; -} - -.ol-attribution ul { - color: #000; - font-size: .7rem; - line-height: 1.375em; - margin: 0; - padding: 0 .5em; - text-shadow: 0 0 2px #fff; -} - -.ol-attribution li { - display: inline; - line-height: inherit; - list-style: none; -} - -.ol-attribution li:not(:last-child):after { - content: " "; -} - -.ol-attribution img { - max-height: 2em; - max-width: inherit; - vertical-align: middle; -} - -.ol-attribution ul, .ol-attribution button { - display: inline-block; -} - -.ol-attribution.ol-collapsed ul { - display: none; -} - -.ol-attribution:not(.ol-collapsed) { - background: rgba(255,255,255,0.8); -} - -.ol-attribution.ol-uncollapsible { - border-radius: 4px 0 0; - bottom: 0; - height: 1.1em; - line-height: 1em; - right: 0; -} - -.ol-attribution.ol-uncollapsible img { - margin-top: -.2em; - max-height: 1.6em; -} - -.ol-attribution.ol-uncollapsible button { - display: none; -} - -.ol-zoomslider { - height: 200px; - left: .5em; - top: 4.5em; -} - -.ol-zoomslider button { - height: 10px; - position: relative; -} - -.ol-touch .ol-zoomslider { - top: 5.5em; -} - -.ol-overviewmap { - bottom: 0.5em; - left: 0.5em; -} - -.ol-overviewmap.ol-uncollapsible { - border-radius: 0 4px 0 0; - bottom: 0; - left: 0; -} - -.ol-overviewmap .ol-overviewmap-map, -.ol-overviewmap button { - display: inline-block; -} - -.ol-overviewmap .ol-overviewmap-map { - border: 1px solid #7b98bc; - height: 150px; - margin: 2px; - width: 150px; -} - -.ol-overviewmap:not(.ol-collapsed) button{ - bottom: 1px; - left: 2px; - position: absolute; -} - -.ol-overviewmap.ol-collapsed .ol-overviewmap-map, -.ol-overviewmap.ol-uncollapsible button { - display: none; -} - -.ol-overviewmap:not(.ol-collapsed) { - background: rgba(255,255,255,0.8); -} - -.ol-overviewmap-box { - border: 2px dotted rgba(0,60,136,0.7); -} - -.ol-overviewmap .ol-overviewmap-box:hover { - cursor: move; -} diff --git a/yarn.lock b/yarn.lock index 0ecf6fb99d8..3042460027f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1825,6 +1825,11 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@petamoriken/float16@^3.4.7": + version "3.8.4" + resolved "https://registry.yarnpkg.com/@petamoriken/float16/-/float16-3.8.4.tgz#cd3c02a7fe39f10ae3dd24ed33bd082053aadd66" + integrity sha512-kB+NJ5Br56ZhElKsf0pM7/PQfrDdDVMRz8f0JM6eVOGE+L89z9hwcst9QvWBBnazzuqGTGtPsJNZoQ1JdNiGSQ== + "@popperjs/core@^2.11.7": version "2.11.7" resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.7.tgz#ccab5c8f7dc557a52ca3288c10075c9ccd37fff7" @@ -3348,6 +3353,11 @@ earcut@^2.2.2: resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.2.3.tgz#d44ced2ff5a18859568e327dd9c7d46b16f55cf4" integrity sha512-iRDI1QeCQIhMCZk48DRDMVgQSSBDmbzzNhnxIo+pwx3swkfjMh6vh0nWLq1NdvGHLKH6wIrAM3vQWeTj6qeoug== +earcut@^2.2.3: + version "2.2.4" + resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.2.4.tgz#6d02fd4d68160c114825d06890a92ecaae60343a" + integrity sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ== + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -3946,6 +3956,20 @@ geojson@^0.5.0: resolved "https://registry.yarnpkg.com/geojson/-/geojson-0.5.0.tgz#3cd6c96399be65b56ee55596116fe9191ce701c0" integrity sha1-PNbJY5m+ZbVu5VWWEW/pGRznAcA= +geotiff@^2.0.7: + version "2.1.0" + resolved "https://registry.yarnpkg.com/geotiff/-/geotiff-2.1.0.tgz#8e06fd1aa950fba8910ac63dc65cb77b766f4b58" + integrity sha512-B/iFJuFfRpmPHXf8aIRPRgUWwfaNb6dlsynkM8SWeHAPu7CpyvfqEa43KlBt7xxq5OTVysQacFHxhCn3SZhRKQ== + dependencies: + "@petamoriken/float16" "^3.4.7" + lerc "^3.0.0" + pako "^2.0.4" + parse-headers "^2.0.2" + quick-lru "^6.1.1" + web-worker "^1.2.0" + xml-utils "^1.0.2" + zstddec "^0.1.0" + get-func-name@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" @@ -4270,7 +4294,7 @@ iconv-lite@0.6.3: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -ieee754@^1.1.12, ieee754@^1.1.6: +ieee754@^1.1.12: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -4724,6 +4748,11 @@ klaw@^1.0.0: optionalDependencies: graceful-fs "^4.1.9" +lerc@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lerc/-/lerc-3.0.0.tgz#36f36fbd4ba46f0abf4833799fff2e7d6865f5cb" + integrity sha512-Rm4J/WaHhRa93nCN2mwWDZFoRVF18G1f47C+kvQWyHGEZxFpTUi73p7lMVSAndyxGt6lJ2/CFbOcf9ra5p8aww== + levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -5159,14 +5188,15 @@ oblivious-set@1.0.0: resolved "https://registry.yarnpkg.com/oblivious-set/-/oblivious-set-1.0.0.tgz#c8316f2c2fb6ff7b11b6158db3234c49f733c566" integrity sha512-z+pI07qxo4c2CulUHCDf9lcqDlMSo72N/4rLUpRXf6fu+q8vjt8y0xS+Tlf8NTJDdTXHbdeO1n3MlbctwEoXZw== -ol@^5.3.3: - version "5.3.3" - resolved "https://registry.yarnpkg.com/ol/-/ol-5.3.3.tgz#ad39b7b485fdbae4b3e1535a0a07cc5d88b0b9b5" - integrity sha512-7eU4x8YMduNcED1D5wI+AMWDRe7/1HmGfsbV+kFFROI9RNABU/6n4osj6Q3trZbxxKnK2DSRIjIRGwRHT/Z+Ww== +ol@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/ol/-/ol-8.1.0.tgz#6f3259855cb331a6fa9cbf363aa69d37bba7306a" + integrity sha512-cx3SH2plpFS9fM8pp1nCypgQXGJD7Mcb1E3mEySmy5XEw1DUEo+kkNzgtAZz5qupekqi7aU9iBJEjCoMfqvO2Q== dependencies: - pbf "3.1.0" - pixelworks "1.1.0" - rbush "2.0.2" + earcut "^2.2.3" + geotiff "^2.0.7" + pbf "3.2.1" + rbush "^3.0.1" once@^1.3.0: version "1.4.0" @@ -5228,6 +5258,11 @@ p-map@^5.5.0: dependencies: aggregate-error "^4.0.0" +pako@^2.0.4: + version "2.1.0" + resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" + integrity sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug== + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -5235,6 +5270,11 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" +parse-headers@^2.0.2: + version "2.0.5" + resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.5.tgz#069793f9356a54008571eb7f9761153e6c770da9" + integrity sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA== + parse-json@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" @@ -5307,15 +5347,7 @@ pathval@^1.1.1: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== -pbf@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/pbf/-/pbf-3.1.0.tgz#f70004badcb281761eabb1e76c92f179f08189e9" - integrity sha512-/hYJmIsTmh7fMkHAWWXJ5b8IKLWdjdlAFb3IHkRBn1XUhIYBChVGfVwmHEAV3UfXTxsP/AKfYTXTS/dCPxJd5w== - dependencies: - ieee754 "^1.1.6" - resolve-protobuf-schema "^2.0.0" - -pbf@^3.2.1: +pbf@3.2.1, pbf@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/pbf/-/pbf-3.2.1.tgz#b4c1b9e72af966cd82c6531691115cc0409ffe2a" integrity sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ== @@ -5343,11 +5375,6 @@ picomatch@^2.3.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pixelworks@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pixelworks/-/pixelworks-1.1.0.tgz#1f095ad48dca8bf8a1c8258e0092031a44f22ca5" - integrity sha1-Hwla1I3Ki/ihyCWOAJIDGkTyLKU= - pkg-types@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.0.2.tgz#c233efc5210a781e160e0cafd60c0d0510a4b12e" @@ -5484,22 +5511,22 @@ quick-lru@^5.1.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== -quickselect@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/quickselect/-/quickselect-1.1.1.tgz#852e412ce418f237ad5b660d70cffac647ae94c2" - integrity sha512-qN0Gqdw4c4KGPsBOQafj6yj/PA6c/L63f6CaZ/DCF/xF4Esu3jVmKLUDYxghFx8Kb/O7y9tI7x2RjTSXwdK1iQ== +quick-lru@^6.1.1: + version "6.1.2" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-6.1.2.tgz#e9a90524108629be35287d0b864e7ad6ceb3659e" + integrity sha512-AAFUA5O1d83pIHEhJwWCq/RQcRukCkn/NSm2QsTEMle5f2hP0ChI2+3Xb051PZCkLryI/Ir1MVKviT2FIloaTQ== quickselect@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/quickselect/-/quickselect-2.0.0.tgz#f19680a486a5eefb581303e023e98faaf25dd018" integrity sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw== -rbush@2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/rbush/-/rbush-2.0.2.tgz#bb6005c2731b7ba1d5a9a035772927d16a614605" - integrity sha512-XBOuALcTm+O/H8G90b6pzu6nX6v2zCKiFG4BJho8a+bY6AER6t8uQUZdi5bomQc0AprCWhEGa7ncAbbRap0bRA== +rbush@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/rbush/-/rbush-3.0.1.tgz#5fafa8a79b3b9afdfe5008403a720cc1de882ecf" + integrity sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w== dependencies: - quickselect "^1.0.1" + quickselect "^2.0.0" react-coordinate-input@^1.0.0: version "1.0.0" @@ -5715,7 +5742,7 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -resolve-protobuf-schema@^2.0.0, resolve-protobuf-schema@^2.1.0: +resolve-protobuf-schema@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz#9ca9a9e69cf192bbdaf1006ec1973948aa4a3758" integrity sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ== @@ -6585,6 +6612,11 @@ warning@^4.0.2: dependencies: loose-envify "^1.0.0" +web-worker@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/web-worker/-/web-worker-1.2.0.tgz#5d85a04a7fbc1e7db58f66595d7a3ac7c9c180da" + integrity sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA== + webidl-conversions@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" @@ -6683,6 +6715,11 @@ xml-name-validator@^4.0.0: resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== +xml-utils@^1.0.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/xml-utils/-/xml-utils-1.7.0.tgz#333ce391d8918f872aaf98d2cf90f9ef9b82bd0f" + integrity sha512-bWB489+RQQclC7A9OW8e5BzbT8Tu//jtAOvkYwewFr+Q9T9KDGvfzC1lp0pYPEQPEoPQLDkmxkepSC/2gIAZGw== + xmlchars@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" @@ -6732,3 +6769,8 @@ zod@^3.20.2: version "3.20.2" resolved "https://registry.yarnpkg.com/zod/-/zod-3.20.2.tgz#068606642c8f51b3333981f91c0a8ab37dfc2807" integrity sha512-1MzNQdAvO+54H+EaK5YpyEy0T+Ejo/7YLHS93G3RnYWh5gaotGHwGeN/ZO687qEDU2y4CdStQYXVHIgrUl5UVQ== + +zstddec@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/zstddec/-/zstddec-0.1.0.tgz#7050f3f0e0c3978562d0c566b3e5a427d2bad7ec" + integrity sha512-w2NTI8+3l3eeltKAdK8QpiLo/flRAr2p8AGeakfMZOXBxOg9HIu4LVDxBi81sYgVhFhdJjv1OrB5ssI8uFPoLg==