@arcgis/map-components-react 4.33.0-next.98 → 4.33.0
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/README.md +3 -57
- package/dist/components.d.ts +10 -5
- package/dist/components.js +8 -3
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# ArcGIS Maps SDK for JavaScript - React wrapper for Map Components
|
|
2
2
|
|
|
3
|
-
> Note: `@arcgis/map-components-react` was developed for use in React 18. Consider updating to React 19 where the React wrapper is no longer necessary. Check out the [documentation](https://developers.arcgis.com/javascript/latest/get-started
|
|
3
|
+
> Note: `@arcgis/map-components-react` was developed for use in React 18. Consider updating to React 19 where the React wrapper is no longer necessary. Check out the [documentation](https://developers.arcgis.com/javascript/latest/get-started/#react) to get started with `@arcgis/map-components` in React 19.
|
|
4
4
|
|
|
5
5
|
The ArcGIS Maps SDK for JavaScript provides a suite of ready-to-use UI components that simplify the process of creating GIS web applications. This package contains a map component, scene component, and many other components with functionality made possible through the SDK's core API which is also accessible through the components.
|
|
6
6
|
|
|
7
7
|
## Documentation
|
|
8
8
|
|
|
9
9
|
- [Key Features](https://developers.arcgis.com/javascript/latest/key-features/)
|
|
10
|
-
- [Build with React](https://developers.arcgis.com/javascript/latest/get-started
|
|
10
|
+
- [Build with React](https://developers.arcgis.com/javascript/latest/get-started/#react)
|
|
11
11
|
- [API and component references](https://developers.arcgis.com/javascript/latest/references/)
|
|
12
12
|
- [Functionality samples](https://developers.arcgis.com/javascript/latest/sample-code/)
|
|
13
13
|
|
|
@@ -27,61 +27,7 @@ The ArcGIS Maps SDK for JavaScript provides a suite of ready-to-use UI component
|
|
|
27
27
|
|
|
28
28
|
## Quick start guide
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
- Install the required packages: `@arcgis/map-components-react`, `@arcgis/core`, `@esri/calcite-components-react`.
|
|
32
|
-
- Import the necessary CSS files in your project and ensure CSS is configured for the map components:
|
|
33
|
-
|
|
34
|
-
```js
|
|
35
|
-
@import 'https://js.arcgis.com/4.31/@arcgis/core/assets/esri/themes/dark/main.css';
|
|
36
|
-
@import url("https://js.arcgis.com/calcite-components/2.3.2/calcite.css");
|
|
37
|
-
|
|
38
|
-
#root,
|
|
39
|
-
html,
|
|
40
|
-
body {
|
|
41
|
-
margin: 0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
arcgis-map {
|
|
45
|
-
display: block;
|
|
46
|
-
height: 100vh;
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
- Add map component: In your main file (e.g., index.tsx), add the `ArcgisMap` component and configure it with an optional `item-id` if using a WebMap from ArcGIS Online or an ArcGIS Enterprise portal:
|
|
51
|
-
|
|
52
|
-
```js
|
|
53
|
-
import React from "react";
|
|
54
|
-
import ReactDOM from "react-dom/client";
|
|
55
|
-
import "@arcgis/map-components/components/arcgis-map";
|
|
56
|
-
import "@arcgis/map-components/components/arcgis-zoom";
|
|
57
|
-
import { ArcgisMap, ArcgisZoom } from "@arcgis/map-components-react";
|
|
58
|
-
|
|
59
|
-
const root = ReactDOM.createRoot(document.getElementById("root"));
|
|
60
|
-
root.render(
|
|
61
|
-
<React.StrictMode>
|
|
62
|
-
<ArcgisMap itemId="your-webmap-item-id"></ArcgisMap>
|
|
63
|
-
</React.StrictMode>,
|
|
64
|
-
);
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
- Add additional functionality: To your map, you could set properties and use events like `onArcgisViewReadyChange` to detect when the map view is ready, and implement custom JavaScript logic using the core API. For example, you can add the `ArcgisZoom` component and listen for view changes:
|
|
68
|
-
|
|
69
|
-
```js
|
|
70
|
-
root.render(
|
|
71
|
-
<React.StrictMode>
|
|
72
|
-
<ArcgisMap
|
|
73
|
-
itemId="your-webmap-item-id"
|
|
74
|
-
onArcgisViewReadyChange={(event: CustomEvent) => {
|
|
75
|
-
console.log("MapView ready", event);
|
|
76
|
-
}}
|
|
77
|
-
>
|
|
78
|
-
<ArcgisZoom position="top-left"></ArcgisZoom>
|
|
79
|
-
</ArcgisMap>
|
|
80
|
-
</React.StrictMode>
|
|
81
|
-
);
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Alternatively, an [example](https://github.com/Esri/jsapi-resources/tree/50579b9362b846e869a343b660c5a2415176a275/component-samples/map-components/samples/react) is available from the 4.31 release in the jsapi-resources repo.
|
|
30
|
+
An [example](https://github.com/Esri/jsapi-resources/tree/50579b9362b846e869a343b660c5a2415176a275/component-samples/map-components/samples/react) is available from the 4.31 release in the jsapi-resources repo.
|
|
85
31
|
|
|
86
32
|
## License
|
|
87
33
|
|
package/dist/components.d.ts
CHANGED
|
@@ -77,6 +77,7 @@ export declare const ArcgisDaylight: import("@lit/react").ReactWebComponent<HTML
|
|
|
77
77
|
class?: string;
|
|
78
78
|
}, {
|
|
79
79
|
onArcgisReady: EventName<HTMLArcgisDaylightElement["arcgisReady"]>;
|
|
80
|
+
onArcgisUserDateTimeChange: EventName<HTMLArcgisDaylightElement["arcgisUserDateTimeChange"]>;
|
|
80
81
|
}>;
|
|
81
82
|
export declare const ArcgisDirectionalPad: import("@lit/react").ReactWebComponent<HTMLArcgisDirectionalPadElement & {
|
|
82
83
|
class?: string;
|
|
@@ -90,6 +91,12 @@ export declare const ArcgisDirections: import("@lit/react").ReactWebComponent<HT
|
|
|
90
91
|
onArcgisPropertyChange: EventName<HTMLArcgisDirectionsElement["arcgisPropertyChange"]>;
|
|
91
92
|
onArcgisReady: EventName<HTMLArcgisDirectionsElement["arcgisReady"]>;
|
|
92
93
|
}>;
|
|
94
|
+
export declare const ArcgisDirectLineMeasurement3d: import("@lit/react").ReactWebComponent<HTMLArcgisDirectLineMeasurement3dElement & {
|
|
95
|
+
class?: string;
|
|
96
|
+
}, {
|
|
97
|
+
onArcgisPropertyChange: EventName<HTMLArcgisDirectLineMeasurement3dElement["arcgisPropertyChange"]>;
|
|
98
|
+
onArcgisReady: EventName<HTMLArcgisDirectLineMeasurement3dElement["arcgisReady"]>;
|
|
99
|
+
}>;
|
|
93
100
|
export declare const ArcgisDirectlineMeasurement3d: import("@lit/react").ReactWebComponent<HTMLArcgisDirectlineMeasurement3dElement & {
|
|
94
101
|
class?: string;
|
|
95
102
|
}, {
|
|
@@ -198,11 +205,6 @@ export declare const ArcgisLayerList: import("@lit/react").ReactWebComponent<HTM
|
|
|
198
205
|
onArcgisReady: EventName<HTMLArcgisLayerListElement["arcgisReady"]>;
|
|
199
206
|
onArcgisTriggerAction: EventName<HTMLArcgisLayerListElement["arcgisTriggerAction"]>;
|
|
200
207
|
}>;
|
|
201
|
-
export declare const ArcgisLayerListItem: import("@lit/react").ReactWebComponent<HTMLArcgisLayerListItemElement & {
|
|
202
|
-
class?: string;
|
|
203
|
-
}, {
|
|
204
|
-
onArcgisPropertyChange: EventName<HTMLArcgisLayerListItemElement["arcgisPropertyChange"]>;
|
|
205
|
-
}>;
|
|
206
208
|
export declare const ArcgisLegend: import("@lit/react").ReactWebComponent<HTMLArcgisLegendElement & {
|
|
207
209
|
class?: string;
|
|
208
210
|
}, {
|
|
@@ -321,6 +323,9 @@ export declare const ArcgisScaleRangeSlider: import("@lit/react").ReactWebCompon
|
|
|
321
323
|
export declare const ArcgisScene: import("@lit/react").ReactWebComponent<HTMLArcgisSceneElement & {
|
|
322
324
|
class?: string;
|
|
323
325
|
}, {
|
|
326
|
+
onArcgisViewAnalysisViewCreate: EventName<HTMLArcgisSceneElement["arcgisViewAnalysisViewCreate"]>;
|
|
327
|
+
onArcgisViewAnalysisViewCreateError: EventName<HTMLArcgisSceneElement["arcgisViewAnalysisViewCreateError"]>;
|
|
328
|
+
onArcgisViewAnalysisViewDestroy: EventName<HTMLArcgisSceneElement["arcgisViewAnalysisViewDestroy"]>;
|
|
324
329
|
onArcgisViewChange: EventName<HTMLArcgisSceneElement["arcgisViewChange"]>;
|
|
325
330
|
onArcgisViewClick: EventName<HTMLArcgisSceneElement["arcgisViewClick"]>;
|
|
326
331
|
onArcgisViewDoubleClick: EventName<HTMLArcgisSceneElement["arcgisViewDoubleClick"]>;
|
package/dist/components.js
CHANGED
|
@@ -56,6 +56,7 @@ export const ArcgisCoordinateConversion = /*@__PURE__*/ createWrapper(getReactWr
|
|
|
56
56
|
}));
|
|
57
57
|
export const ArcgisDaylight = /*@__PURE__*/ createWrapper(getReactWrapperOptions("arcgis-daylight", {
|
|
58
58
|
onArcgisReady: "arcgisReady",
|
|
59
|
+
onArcgisUserDateTimeChange: "arcgisUserDateTimeChange",
|
|
59
60
|
}));
|
|
60
61
|
export const ArcgisDirectionalPad = /*@__PURE__*/ createWrapper(getReactWrapperOptions("arcgis-directional-pad", {
|
|
61
62
|
onArcgisPropertyChange: "arcgisPropertyChange",
|
|
@@ -65,6 +66,10 @@ export const ArcgisDirections = /*@__PURE__*/ createWrapper(getReactWrapperOptio
|
|
|
65
66
|
onArcgisPropertyChange: "arcgisPropertyChange",
|
|
66
67
|
onArcgisReady: "arcgisReady",
|
|
67
68
|
}));
|
|
69
|
+
export const ArcgisDirectLineMeasurement3d = /*@__PURE__*/ createWrapper(getReactWrapperOptions("arcgis-direct-line-measurement-3d", {
|
|
70
|
+
onArcgisPropertyChange: "arcgisPropertyChange",
|
|
71
|
+
onArcgisReady: "arcgisReady",
|
|
72
|
+
}));
|
|
68
73
|
export const ArcgisDirectlineMeasurement3d = /*@__PURE__*/ createWrapper(getReactWrapperOptions("arcgis-directline-measurement-3d", {
|
|
69
74
|
onArcgisPropertyChange: "arcgisPropertyChange",
|
|
70
75
|
onArcgisReady: "arcgisReady",
|
|
@@ -141,9 +146,6 @@ export const ArcgisLayerList = /*@__PURE__*/ createWrapper(getReactWrapperOption
|
|
|
141
146
|
onArcgisReady: "arcgisReady",
|
|
142
147
|
onArcgisTriggerAction: "arcgisTriggerAction",
|
|
143
148
|
}));
|
|
144
|
-
export const ArcgisLayerListItem = /*@__PURE__*/ createWrapper(getReactWrapperOptions("arcgis-layer-list-item", {
|
|
145
|
-
onArcgisPropertyChange: "arcgisPropertyChange",
|
|
146
|
-
}));
|
|
147
149
|
export const ArcgisLegend = /*@__PURE__*/ createWrapper(getReactWrapperOptions("arcgis-legend", {
|
|
148
150
|
onArcgisPropertyChange: "arcgisPropertyChange",
|
|
149
151
|
onArcgisReady: "arcgisReady",
|
|
@@ -234,6 +236,9 @@ export const ArcgisScaleRangeSlider = /*@__PURE__*/ createWrapper(getReactWrappe
|
|
|
234
236
|
onArcgisReady: "arcgisReady",
|
|
235
237
|
}));
|
|
236
238
|
export const ArcgisScene = /*@__PURE__*/ createWrapper(getReactWrapperOptions("arcgis-scene", {
|
|
239
|
+
onArcgisViewAnalysisViewCreate: "arcgisViewAnalysisViewCreate",
|
|
240
|
+
onArcgisViewAnalysisViewCreateError: "arcgisViewAnalysisViewCreateError",
|
|
241
|
+
onArcgisViewAnalysisViewDestroy: "arcgisViewAnalysisViewDestroy",
|
|
237
242
|
onArcgisViewChange: "arcgisViewChange",
|
|
238
243
|
onArcgisViewClick: "arcgisViewClick",
|
|
239
244
|
onArcgisViewDoubleClick: "arcgisViewDoubleClick",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/map-components-react",
|
|
3
|
-
"version": "4.33.0
|
|
3
|
+
"version": "4.33.0",
|
|
4
4
|
"description": "A set of React components that wrap ArcGIS map components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
],
|
|
30
30
|
"license": "SEE LICENSE.md",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@arcgis/map-components": "4.33.0
|
|
33
|
-
"@esri/calcite-components": "^3.2.
|
|
34
|
-
"@lit/react": "^1.0.
|
|
35
|
-
"tslib": "^2.
|
|
32
|
+
"@arcgis/map-components": "4.33.0",
|
|
33
|
+
"@esri/calcite-components": "^3.2.1",
|
|
34
|
+
"@lit/react": "^1.0.7",
|
|
35
|
+
"tslib": "^2.8.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@arcgis/core": "
|
|
39
|
-
"react": ">=18.0.0 <
|
|
40
|
-
"react-dom": ">=18.0.0 <
|
|
38
|
+
"@arcgis/core": "~4.33.0",
|
|
39
|
+
"react": ">=18.0.0 <20.0.0",
|
|
40
|
+
"react-dom": ">=18.0.0 <20.0.0"
|
|
41
41
|
}
|
|
42
42
|
}
|