<?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 Load GeoJSON QuickStart Map API 4.10 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/load-geojson-quickstart-map-api-4-10/m-p/81481#M7454</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to update the code for loading GeoJSON available in &lt;A href="http://esri.github.io/quickstart-map-js/html/data/load_geojson.html"&gt;here&lt;/A&gt; and I am having some issue while creating the FeatureLayer.&lt;/P&gt;&lt;P&gt;The original code 1 (ArcGIS 3.10compact) was changed to code 2 (ArcGIS 4.10, but the response while checking the console.log are not the same for both codes. Could someone point me what is going wrong? Why the response are not the same? has the code has already been updated to ArcGIS API 4.10 version?&lt;/P&gt;&lt;P&gt;I appreciated your time&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Julierme&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code 1&lt;/P&gt;&lt;P&gt;// Create a feature layer for the GeoJSON&lt;BR /&gt; function addGeoJSONLayer(geojson) {&lt;BR /&gt; if (!geojson.features.length) {&lt;BR /&gt; return;&lt;BR /&gt; }&lt;BR /&gt; removeGeoJSONLayer();&lt;BR /&gt; // Get geometry type - assume same geometry for entire file!&lt;BR /&gt; var esriGeometryType = getEsriGeometryType(geojson.features[0].geometry.type);&lt;BR /&gt; // Create an skeleton collection and popup definition&lt;BR /&gt; var featureCollection = createFeatureCollection(esriGeometryType);&lt;/P&gt;&lt;P&gt;console.log("I am featureCollection: ", featureCollection); &lt;BR /&gt; // Display all the attributes from the GeoJSON in the Popup&lt;/P&gt;&lt;P&gt;var infoTemplate = new InfoTemplate("Julierme GeoJSON Data", "${*}");&lt;BR /&gt; &lt;BR /&gt; // Display only specific attributes in from the GeoJSON file in the Popup&lt;/P&gt;&lt;P&gt;// var infoTemplate = new InfoTemplate("Julierme GeoJSON Data", "Country: ${OBJECTID}&amp;lt;br&amp;gt;Name: ${name}");&lt;BR /&gt; // Create feature layer &lt;BR /&gt; featureLayer = new FeatureLayer(featureCollection, {&lt;BR /&gt; mode: FeatureLayer.MODE_SNAPSHOT,&lt;BR /&gt; outFields: ["*"], &lt;BR /&gt; infoTemplate: infoTemplate&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;console.log("This is featureLayer: ", featureLayer);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code 2&lt;/P&gt;&lt;P&gt;featureLayer = new FeatureLayer({&lt;BR /&gt; source: featureCollection,&lt;BR /&gt; outFields: ["*"],&lt;BR /&gt; popupTemplate: template&lt;/P&gt;&lt;P&gt;});&lt;BR /&gt; console.log("I am featureLayer: ",featureLayer);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://esri.github.io/quickstart-map-js/index.html" title="http://esri.github.io/quickstart-map-js/index.html"&gt;Mapping Examples&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Feb 2019 13:31:22 GMT</pubDate>
    <dc:creator>JuliermePinheiro</dc:creator>
    <dc:date>2019-02-27T13:31:22Z</dc:date>
    <item>
      <title>Load GeoJSON QuickStart Map API 4.10</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/load-geojson-quickstart-map-api-4-10/m-p/81481#M7454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to update the code for loading GeoJSON available in &lt;A href="http://esri.github.io/quickstart-map-js/html/data/load_geojson.html"&gt;here&lt;/A&gt; and I am having some issue while creating the FeatureLayer.&lt;/P&gt;&lt;P&gt;The original code 1 (ArcGIS 3.10compact) was changed to code 2 (ArcGIS 4.10, but the response while checking the console.log are not the same for both codes. Could someone point me what is going wrong? Why the response are not the same? has the code has already been updated to ArcGIS API 4.10 version?&lt;/P&gt;&lt;P&gt;I appreciated your time&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Julierme&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code 1&lt;/P&gt;&lt;P&gt;// Create a feature layer for the GeoJSON&lt;BR /&gt; function addGeoJSONLayer(geojson) {&lt;BR /&gt; if (!geojson.features.length) {&lt;BR /&gt; return;&lt;BR /&gt; }&lt;BR /&gt; removeGeoJSONLayer();&lt;BR /&gt; // Get geometry type - assume same geometry for entire file!&lt;BR /&gt; var esriGeometryType = getEsriGeometryType(geojson.features[0].geometry.type);&lt;BR /&gt; // Create an skeleton collection and popup definition&lt;BR /&gt; var featureCollection = createFeatureCollection(esriGeometryType);&lt;/P&gt;&lt;P&gt;console.log("I am featureCollection: ", featureCollection); &lt;BR /&gt; // Display all the attributes from the GeoJSON in the Popup&lt;/P&gt;&lt;P&gt;var infoTemplate = new InfoTemplate("Julierme GeoJSON Data", "${*}");&lt;BR /&gt; &lt;BR /&gt; // Display only specific attributes in from the GeoJSON file in the Popup&lt;/P&gt;&lt;P&gt;// var infoTemplate = new InfoTemplate("Julierme GeoJSON Data", "Country: ${OBJECTID}&amp;lt;br&amp;gt;Name: ${name}");&lt;BR /&gt; // Create feature layer &lt;BR /&gt; featureLayer = new FeatureLayer(featureCollection, {&lt;BR /&gt; mode: FeatureLayer.MODE_SNAPSHOT,&lt;BR /&gt; outFields: ["*"], &lt;BR /&gt; infoTemplate: infoTemplate&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;console.log("This is featureLayer: ", featureLayer);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code 2&lt;/P&gt;&lt;P&gt;featureLayer = new FeatureLayer({&lt;BR /&gt; source: featureCollection,&lt;BR /&gt; outFields: ["*"],&lt;BR /&gt; popupTemplate: template&lt;/P&gt;&lt;P&gt;});&lt;BR /&gt; console.log("I am featureLayer: ",featureLayer);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://esri.github.io/quickstart-map-js/index.html" title="http://esri.github.io/quickstart-map-js/index.html"&gt;Mapping Examples&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2019 13:31:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/load-geojson-quickstart-map-api-4-10/m-p/81481#M7454</guid>
      <dc:creator>JuliermePinheiro</dc:creator>
      <dc:date>2019-02-27T13:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Load GeoJSON QuickStart Map API 4.10</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/load-geojson-quickstart-map-api-4-10/m-p/81482#M7455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Julierme,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please review our example showing the creation of a feature layer from GeoJSON using our 4.x API.&amp;nbsp; &lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer-collection/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer-collection/index.html"&gt;Create a FeatureLayer with client side graphics | ArcGIS API for JavaScript 4.10&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a many changes between the 3.x and 4.x API versions and you may have to make changes to your code throughout as the API coding patterns have changed.&amp;nbsp; Again, please review the sample and modify your code as needed to match the patterns used in the 4.x API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Mar 2019 14:48:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/load-geojson-quickstart-map-api-4-10/m-p/81482#M7455</guid>
      <dc:creator>AndrewKniowski1</dc:creator>
      <dc:date>2019-03-05T14:48:30Z</dc:date>
    </item>
  </channel>
</rss>

