Select to view content in your preferred language

React Map Components

287
1
2 weeks ago
vijaybadugu
Frequent Contributor

 

I would like to use arcgis components in my react js project.When i try to run the project, i am getting below error . react component has been installed (@ArcGIS/map-components-react ). The code looks as below,

<ArcgisMap item-id={itemId} portal-url={portalUrl} style={{ width: '100%', height: '100%' } }>
       <ArcgisZoom position="top-left"></ArcgisZoom>
       <ArcgisSearch
         position="top-right"

         all-placeholder="District or Senator"
     
         include-default-sources-disabled></ArcgisSearch>
     </ArcgisMap>
 

vijaybadugu_0-1754951414032.png

 

0 Kudos
1 Reply
JonathanDawe_BAS
Regular Contributor

You probably will need to include the individual import for each component you are using in the file. For an example see the Esri sample here: https://github.com/Esri/jsapi-resources/blob/50579b9362b846e869a343b660c5a2415176a275/component-samp... 

Overall if you are working in React 19 I would probably just look at using the web components directly instead of the wrapper library! 

0 Kudos