Select to view content in your preferred language

<Map> component doesn't have children property: Migrating @esri/react-arcgis to @arcgis/core

279
1
Jump to solution
06-13-2024 09:47 AM
HariKrishnaInukollu
Emerging Contributor

Hello Team,

We are using the <Map> Component from the @esri/react-arcgis library and it has the properties like viewProperties, children.

 

 

<Map
    viewProperties={{
       extent,
       zoom: 12,
       popup: {
         dockOptions: {
           buttonEnabled: false,
         },
       },
       constraints: {
         geometry: fullEarthGeometry,
         minScale: zoomedOutEarthScale,
         rotationEnabled: false,
       },
     }}
   >
     {props.children}
     <AnotherComponent />
   </Map>

 

 

Now, we are migrating the @esri/react-arcgis to @ArcGIS/core library, however, the new library doesn't support the above properties like children and viewProperties. Could you please guide me.

 

Thanks,

Hari

0 Kudos
1 Solution

Accepted Solutions
AndyGup
Esri Regular Contributor

Hi @HariKrishnaInukollu  are you migrating to the "@arcgis/core" npm package which is our core API, or the new web components?

For the new web components here's a getting started tutorial https://developers.arcgis.com/javascript/latest/tutorials/using-view-with-components/ and here's the Map component reference documentation: https://developers.arcgis.com/javascript/latest/references/map-components/?path=/docs/component-refe... and here are some getting started guidelines for using components with React: https://developers.arcgis.com/javascript/latest/get-started-react/.

View solution in original post

0 Kudos
1 Reply
AndyGup
Esri Regular Contributor

Hi @HariKrishnaInukollu  are you migrating to the "@arcgis/core" npm package which is our core API, or the new web components?

For the new web components here's a getting started tutorial https://developers.arcgis.com/javascript/latest/tutorials/using-view-with-components/ and here's the Map component reference documentation: https://developers.arcgis.com/javascript/latest/references/map-components/?path=/docs/component-refe... and here are some getting started guidelines for using components with React: https://developers.arcgis.com/javascript/latest/get-started-react/.

0 Kudos