@arcgis/map-components-react 4.34.0-next.9 → 4.34.0-next.91
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/LICENSE.md +9 -5
- package/README.md +16 -63
- package/dist/components.d.ts +75 -85
- package/dist/index.d.ts +1 -1
- package/dist/index.js +689 -1
- package/package.json +6 -4
- package/dist/components.js +0 -373
package/LICENSE.md
CHANGED
|
@@ -4,10 +4,14 @@ COPYRIGHT © 2025 Esri
|
|
|
4
4
|
|
|
5
5
|
All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.
|
|
6
6
|
|
|
7
|
-
This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement.
|
|
7
|
+
This material is licensed for use under the [Esri Master License Agreement (MLA)](https://www.esri.com/content/dam/esrisites/en-us/media/legal/ma-full/ma-full.pdf), and is bound by the terms of that agreement.
|
|
8
|
+
You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
For additional information, contact:
|
|
11
|
+
Environmental Systems Research Institute, Inc.
|
|
12
|
+
Attn: Contracts and Legal Services Department
|
|
13
|
+
380 New York Street
|
|
14
|
+
Redlands, California, USA 92373
|
|
15
|
+
USA
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
email: contracts@esri.com
|
|
17
|
+
email: legal@esri.com
|
package/README.md
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
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
|
-
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
|
|
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](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-map/), [Scene component](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-scene/), and many other components with functionality made possible through the SDK's [core API](https://developers.arcgis.com/javascript/latest/api-reference/) which is also accessible through the components.
|
|
6
|
+
|
|
7
|
+
Want to get started immediately? See [Get started](https://developers.arcgis.com/javascript/latest/get-started/) or try out the [sample applications](https://github.com/Esri/jsapi-resources/tree/main/component-samples) for a variety of popular frameworks, module bundlers, and TypeScript.
|
|
6
8
|
|
|
7
9
|
## Documentation
|
|
8
10
|
|
|
9
11
|
- [Key Features](https://developers.arcgis.com/javascript/latest/key-features/)
|
|
10
|
-
- [Build with React](https://developers.arcgis.com/javascript/latest/get-started
|
|
12
|
+
- [Build with React](https://developers.arcgis.com/javascript/latest/get-started/#react)
|
|
11
13
|
- [API and component references](https://developers.arcgis.com/javascript/latest/references/)
|
|
12
14
|
- [Functionality samples](https://developers.arcgis.com/javascript/latest/sample-code/)
|
|
15
|
+
- [TypeScript setup](https://developers.arcgis.com/javascript/latest/get-started/#typescript)
|
|
13
16
|
|
|
14
17
|
## Resources
|
|
15
18
|
|
|
@@ -27,61 +30,7 @@ The ArcGIS Maps SDK for JavaScript provides a suite of ready-to-use UI component
|
|
|
27
30
|
|
|
28
31
|
## Quick start guide
|
|
29
32
|
|
|
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.
|
|
33
|
+
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
34
|
|
|
86
35
|
## License
|
|
87
36
|
|
|
@@ -89,10 +38,14 @@ COPYRIGHT © 2025 Esri
|
|
|
89
38
|
|
|
90
39
|
All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.
|
|
91
40
|
|
|
92
|
-
This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement.
|
|
93
|
-
|
|
94
|
-
See use restrictions at <http://www.esri.com/legal/pdfs/mla_e204_e300/english>
|
|
41
|
+
This material is licensed for use under the [Esri Master License Agreement (MLA)](https://www.esri.com/content/dam/esrisites/en-us/media/legal/ma-full/ma-full.pdf), and is bound by the terms of that agreement.
|
|
42
|
+
You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
|
|
95
43
|
|
|
96
|
-
For additional information, contact:
|
|
44
|
+
For additional information, contact:
|
|
45
|
+
Environmental Systems Research Institute, Inc.
|
|
46
|
+
Attn: Contracts and Legal Services Department
|
|
47
|
+
380 New York Street
|
|
48
|
+
Redlands, California, USA 92373
|
|
49
|
+
USA
|
|
97
50
|
|
|
98
|
-
email:
|
|
51
|
+
email: legal@esri.com
|