@eeacms/volto-arcgis-block 0.1.424 → 0.1.425
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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
### [0.1.425](https://github.com/eea/volto-arcgis-block/compare/0.1.424...0.1.425) - 4 February 2026
|
|
8
|
+
|
|
7
9
|
### [0.1.424](https://github.com/eea/volto-arcgis-block/compare/0.1.423...0.1.424) - 29 January 2026
|
|
8
10
|
|
|
9
11
|
#### :hammer_and_wrench: Others
|
package/package.json
CHANGED
|
@@ -20,6 +20,7 @@ import BasemapWidget from './BasemapWidget';
|
|
|
20
20
|
import MeasurementWidget from './MeasurementWidget';
|
|
21
21
|
import PrintWidget from './PrintWidget';
|
|
22
22
|
import SwipeWidget from './SwipeWidget';
|
|
23
|
+
import SearchWidget from './SearchWidget';
|
|
23
24
|
import AreaWidget from './AreaWidget';
|
|
24
25
|
import ScaleWidget from './ScaleWidget';
|
|
25
26
|
import LegendWidget from './LegendWidget';
|
|
@@ -914,6 +915,10 @@ class MapViewer extends React.Component {
|
|
|
914
915
|
/>
|
|
915
916
|
);
|
|
916
917
|
}
|
|
918
|
+
renderSearch() {
|
|
919
|
+
if (this.props.mapviewer_config.Download) return;
|
|
920
|
+
if (this.view) return <SearchWidget view={this.view} mapViewer={this} />;
|
|
921
|
+
}
|
|
917
922
|
|
|
918
923
|
renderArea() {
|
|
919
924
|
if (this.props.mapviewer_config.Download) return;
|
|
@@ -1054,6 +1059,7 @@ class MapViewer extends React.Component {
|
|
|
1054
1059
|
{this.renderMeasurement()}
|
|
1055
1060
|
{this.renderPrint()}
|
|
1056
1061
|
{this.renderSwipe()}
|
|
1062
|
+
{this.renderSearch()}
|
|
1057
1063
|
{this.renderArea()}
|
|
1058
1064
|
{this.renderPan()}
|
|
1059
1065
|
{this.renderScale()}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, { createRef } from 'react';
|
|
2
|
+
//import "@arcgis/core/assets/esri/css/main.css";
|
|
3
|
+
//import "./css/ArcgisMap.css";
|
|
4
|
+
import { loadModules } from 'esri-loader';
|
|
5
|
+
var Search;
|
|
6
|
+
|
|
7
|
+
class SearchWidget extends React.Component {
|
|
8
|
+
/**
|
|
9
|
+
* Creator of the Measurement widget class
|
|
10
|
+
* @param {*} props
|
|
11
|
+
*/
|
|
12
|
+
constructor(props) {
|
|
13
|
+
super(props);
|
|
14
|
+
//We create a reference to a DOM element to be mounted
|
|
15
|
+
this.container = createRef();
|
|
16
|
+
//Initially, we set the state of the component to
|
|
17
|
+
//not be showing the basemap panel
|
|
18
|
+
this.state = { showMapMenu: false };
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
loader() {
|
|
22
|
+
return loadModules(['esri/widgets/Search']).then(([_Search]) => {
|
|
23
|
+
Search = _Search;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* This method is executed after the rener method is executed
|
|
29
|
+
*/
|
|
30
|
+
async componentDidMount() {
|
|
31
|
+
await this.loader();
|
|
32
|
+
if (!this.container.current) return;
|
|
33
|
+
this.props.view.when(() => {
|
|
34
|
+
this.props.view.ui.add(this.container.current, 'top-left');
|
|
35
|
+
this.search = new Search({
|
|
36
|
+
view: this.props.view,
|
|
37
|
+
locationEnabled: false,
|
|
38
|
+
});
|
|
39
|
+
this.props.view.ui.add(this.search);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* This method renders the component
|
|
45
|
+
* @returns jsx
|
|
46
|
+
*/
|
|
47
|
+
render() {
|
|
48
|
+
return (
|
|
49
|
+
<>
|
|
50
|
+
<div ref={this.container} className="search-container"></div>
|
|
51
|
+
</>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export default SearchWidget;
|
|
@@ -728,9 +728,34 @@ div.upload-container
|
|
|
728
728
|
|
|
729
729
|
.map-left-menu-container {
|
|
730
730
|
display: flex;
|
|
731
|
+
padding-top: 1.5rem;
|
|
731
732
|
box-shadow: none !important;
|
|
732
733
|
}
|
|
733
734
|
|
|
735
|
+
.esri-search {
|
|
736
|
+
width: 30.3rem !important;
|
|
737
|
+
margin-top: 0.4rem;
|
|
738
|
+
margin-left: 1rem;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
.esri-widget--button.esri-search__clear-button {
|
|
742
|
+
background-color: white !important;
|
|
743
|
+
color: black !important;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
.esri-widget--button.esri-search__clear-button:hover {
|
|
747
|
+
background-color: white !important;
|
|
748
|
+
color: black !important;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
.esri-search__input {
|
|
752
|
+
height: 100% !important;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
.esri-search__input:focus {
|
|
756
|
+
outline: 2px solid black !important;
|
|
757
|
+
}
|
|
758
|
+
|
|
734
759
|
.map-menu .ccl-fieldset {
|
|
735
760
|
box-sizing: border-box;
|
|
736
761
|
padding: 0;
|