<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: &amp;lt;Map&amp;gt; component doesn't have children property: Migrating @esri/react-arcgis to @arcgis/core in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lt-map-gt-component-doesn-t-have-children-property/m-p/1496939#M84919</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/666601"&gt;@JamesIng&lt;/a&gt;&amp;nbsp;for the reply, since I have the current implementation in react JSX. Could you please provide it in React JSX?&lt;BR /&gt;&lt;BR /&gt;`&lt;/P&gt;&lt;PRE&gt;&amp;lt;Map
    viewProperties={{
       extent,
       zoom: 12,
       popup: {
         dockOptions: {
           buttonEnabled: false,
         },
       },
       constraints: {
         geometry: fullEarthGeometry,
         minScale: zoomedOutEarthScale,
         rotationEnabled: false,
       },
     }}
   &amp;gt;
     {props.children}
     &amp;lt;AnotherComponent /&amp;gt;
   &amp;lt;/Map&amp;gt;&lt;/PRE&gt;&lt;P&gt;`&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2024 03:22:44 GMT</pubDate>
    <dc:creator>HariKrishnaInukollu</dc:creator>
    <dc:date>2024-06-25T03:22:44Z</dc:date>
    <item>
      <title>&lt;Map&gt; component doesn't have children property: Migrating @esri/react-arcgis to @arcgis/core</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lt-map-gt-component-doesn-t-have-children-property/m-p/1493907#M84885</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;We are using the &amp;lt;Map&amp;gt; Component from the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;@esri/react-arcgis&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;library and it has the properties like viewProperties, children.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;Map
    viewProperties={{
       extent,
       zoom: 12,
       popup: {
         dockOptions: {
           buttonEnabled: false,
         },
       },
       constraints: {
         geometry: fullEarthGeometry,
         minScale: zoomedOutEarthScale,
         rotationEnabled: false,
       },
     }}
   &amp;gt;
     {props.children}
     &amp;lt;AnotherComponent /&amp;gt;
   &amp;lt;/Map&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, we are migrating the&amp;nbsp;&lt;STRONG&gt;@esri/react-arcgis&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/642472" target="_blank" rel="noopener"&gt;@ArcGIS&lt;/A&gt;/core&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;library, however, the new library doesn't support the above properties like children and viewProperties. Could you please guide me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Hari&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 17:54:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lt-map-gt-component-doesn-t-have-children-property/m-p/1493907#M84885</guid>
      <dc:creator>HariKrishnaInukollu</dc:creator>
      <dc:date>2024-06-17T17:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: &lt;Map&gt; component doesn't have children property: Migrating @esri/react-arcgis to @arcgis/core</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lt-map-gt-component-doesn-t-have-children-property/m-p/1493984#M84888</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/666876"&gt;@HariKrishnaInukollu&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;If you're using /core you create a object from the class Map, and then can just access it's properties directly.&lt;BR /&gt;Same applies for MapView.&lt;BR /&gt;The 'container' property refers to a div with a matching ID.&lt;BR /&gt;&lt;BR /&gt;e.g:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import MapView from "@arcgis/core/views/MapView"


    const mapView = new MapView({
      container: "mapView",
      map: webMap,
      constraints: {
        minScale: 70000,
        maxScale: 1000,
      },
    })&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;So you wouldn't use children any more, as the map is it's own item in the DOM,&amp;nbsp;&lt;BR /&gt;But you can add widgets and such using the .ui property:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import Compass from "@arcgis/core/widgets/Compass"


    mapView.ui.add(
      new Compass({
        view: mapView,
      }),
      { position: "top-left" }
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 21:14:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lt-map-gt-component-doesn-t-have-children-property/m-p/1493984#M84888</guid>
      <dc:creator>JamesIng</dc:creator>
      <dc:date>2024-06-17T21:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: &lt;Map&gt; component doesn't have children property: Migrating @esri/react-arcgis to @arcgis/core</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lt-map-gt-component-doesn-t-have-children-property/m-p/1496939#M84919</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/666601"&gt;@JamesIng&lt;/a&gt;&amp;nbsp;for the reply, since I have the current implementation in react JSX. Could you please provide it in React JSX?&lt;BR /&gt;&lt;BR /&gt;`&lt;/P&gt;&lt;PRE&gt;&amp;lt;Map
    viewProperties={{
       extent,
       zoom: 12,
       popup: {
         dockOptions: {
           buttonEnabled: false,
         },
       },
       constraints: {
         geometry: fullEarthGeometry,
         minScale: zoomedOutEarthScale,
         rotationEnabled: false,
       },
     }}
   &amp;gt;
     {props.children}
     &amp;lt;AnotherComponent /&amp;gt;
   &amp;lt;/Map&amp;gt;&lt;/PRE&gt;&lt;P&gt;`&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 03:22:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lt-map-gt-component-doesn-t-have-children-property/m-p/1496939#M84919</guid>
      <dc:creator>HariKrishnaInukollu</dc:creator>
      <dc:date>2024-06-25T03:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: &lt;Map&gt; component doesn't have children property: Migrating @esri/react-arcgis to @arcgis/core</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lt-map-gt-component-doesn-t-have-children-property/m-p/1496944#M84920</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/666876"&gt;@HariKrishnaInukollu&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Your implementation is likely to be different depending on what other children or components your hoping to render, but this is effectively a basic translation of your example above into React using the esri JS framework.&lt;BR /&gt;&lt;BR /&gt;I've just created various constants to fill in the blank variables.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import React, { useEffect, useState } from "react";
import MapView from "@arcgis/core/views/MapView";
import WebMap from "@arcgis/core/Map";
import esriConfig from "@arcgis/core/config";
import { ESRI_API_KEY } from "../../constants";
import AnotherComponent from "./AnotherComponent";

export default function MapViewer({}) {
  useEffect(() =&amp;gt; {
    const fullEarthGeometry = {
      type: "polygon",
      rings: [
        [
          [-180, 90],
          [180, 90],
          [180, -90],
          [-180, -90],
          [-180, 90]
        ]
      ]
    };
    const zoomedOutEarthScale = 591657527.591555;
    const extent = {
      xmin: -180,
      ymin: -90,
      xmax: 180,
      ymax: 90,
      spatialReference: {
        wkid: 4326
      }
    };
    const setupMap = () =&amp;gt; {
      esriConfig.apiKey = ESRI_API_KEY;
      const map = new WebMap({
        basemap: "arcgis-imagery"
      });
      const view = new MapView({
        container: "mapView",
        map: map,
        zoom: 12,
        constraints: {
          geometry: fullEarthGeometry,
          minScale: zoomedOutEarthScale,
          rotationEnabled: false
        },
        popup: {
          dockOptions: {
            buttonEnabled: false
          }
        },
        extent
      });
      view.ui.move(["zoom"], "top-right");
    };
    setupMap();
  }, []);

  return (
    &amp;lt;div id="map-wrapper"&amp;gt;
      &amp;lt;div id="mapView"&amp;gt;&amp;lt;/div&amp;gt;
      &amp;lt;AnotherComponent /&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 03:47:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/lt-map-gt-component-doesn-t-have-children-property/m-p/1496944#M84920</guid>
      <dc:creator>JamesIng</dc:creator>
      <dc:date>2024-06-25T03:47:36Z</dc:date>
    </item>
  </channel>
</rss>

