<?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: create graphic from coordinates of json file onto map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-graphic-from-coordinates-of-json-file-onto/m-p/147804#M13779</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,Its a bit urgent.I couldnt find anything related to display of geojson co-ordinates on map as graphic. Please let me know if this will work or it works with only json format file. Iam using 3.26 version javascript api.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Nov 2018 12:25:31 GMT</pubDate>
    <dc:creator>charmilakondayagunta</dc:creator>
    <dc:date>2018-11-20T12:25:31Z</dc:date>
    <item>
      <title>create graphic from coordinates of json file onto map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-graphic-from-coordinates-of-json-file-onto/m-p/147803#M13778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need immediate help . Iam new to arcgis javascript api.Iam working on 3.26 version. I have a geojson file as below : Please let me know how i can create a graphic at the coordinate given in this json file. Actually i should be able to read co-ordinates from this json file and display it as a graphic on map&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt; "type": "FeatureCollection",&lt;BR /&gt; "features": [&lt;BR /&gt; {&lt;BR /&gt; "type": "Feature",&lt;BR /&gt; "geometry": {&lt;BR /&gt; "type": "Point",&lt;BR /&gt; "coordinates": [&lt;SPAN&gt;-88.13198711899997, 41.79304797900005&lt;/SPAN&gt;]&lt;BR /&gt; },&lt;BR /&gt; "properties": {&lt;BR /&gt; "LocationId": 1,&lt;BR /&gt; "GeometryType": "Point"&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find my code snippet below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var map;&lt;/P&gt;&lt;P&gt;require([&lt;BR /&gt; "esri/map", "esri/layers/FeatureLayer", "esri/layers/GraphicsLayer",&lt;BR /&gt; "esri/tasks/query", "esri/geometry/Circle", "esri/SpatialReference", "esri/geometry/Point",&lt;BR /&gt; "esri/graphic", "esri/symbols/SimpleMarkerSymbol",&lt;BR /&gt; "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol", "esri/renderers/SimpleRenderer",&lt;BR /&gt; "esri/config", "esri/Color", "dojo/dom", "dojo/domReady!"&lt;BR /&gt;], function(&lt;BR /&gt; Map, FeatureLayer,&lt;BR /&gt; GraphicsLayer,&lt;BR /&gt; Query, Circle, SpatialReference, Point,&lt;BR /&gt; Graphic, SimpleMarkerSymbol,&lt;BR /&gt; SimpleLineSymbol, SimpleFillSymbol, SimpleRenderer,&lt;BR /&gt; esriConfig, Color, dom&lt;BR /&gt;) {&lt;/P&gt;&lt;P&gt;map = new Map("mapDiv", {&lt;BR /&gt; basemap: "streets",&lt;BR /&gt; center: [-88.158805, 41.786075],&lt;BR /&gt; zoom: 17,&lt;BR /&gt; slider: false&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var pointGLayer = new GraphicsLayer();&lt;BR /&gt;&lt;BR /&gt; map.addLayer(pointGLayer);&lt;/P&gt;&lt;P&gt;var data = [&lt;BR /&gt; {&lt;BR /&gt; "type": "FeatureCollection",&lt;BR /&gt; "features": [&lt;BR /&gt; {&lt;BR /&gt; "type": "Feature",&lt;BR /&gt; "geometry": {&lt;BR /&gt; "type": "Point",&lt;BR /&gt; "coordinates": [-88.13198711899997, 41.79304797900005]&lt;BR /&gt; },&lt;BR /&gt; "properties": {&lt;BR /&gt; "LocationId": 1,&lt;BR /&gt; "GeometryType": "esriGeometryPoint"&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; }]&lt;BR /&gt;}];&lt;BR /&gt; var symbol = new SimpleMarkerSymbol(&lt;BR /&gt; SimpleMarkerSymbol.STYLE_CIRCLE,&lt;BR /&gt; 12,&lt;BR /&gt; new SimpleLineSymbol(&lt;BR /&gt; SimpleLineSymbol.STYLE_NULL,&lt;BR /&gt; new Color([247, 34, 101, 0.9]),&lt;BR /&gt; 1&lt;BR /&gt; ),&lt;BR /&gt; new Color([207, 34, 171, 0.5])&lt;BR /&gt; );&lt;/P&gt;&lt;P&gt;for (i = 0; i &amp;lt; data.features.length; i++) {&lt;BR /&gt; var pt = new Point(features&lt;I&gt;.geometry.coordinates&lt;I&gt;[0], features&lt;I&gt;.geometry.coordinates&lt;I&gt;[1],&lt;BR /&gt; new SpatialReference({&lt;BR /&gt; wkid: 4326&lt;BR /&gt; }));&lt;BR /&gt; var graphic = new Graphic(pt, symbol);&lt;BR /&gt; pointGLayer.add(graphic);&lt;BR /&gt; console.log(data);&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2018 14:21:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-graphic-from-coordinates-of-json-file-onto/m-p/147803#M13778</guid>
      <dc:creator>charmilakondayagunta</dc:creator>
      <dc:date>2018-11-19T14:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: create graphic from coordinates of json file onto map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-graphic-from-coordinates-of-json-file-onto/m-p/147804#M13779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,Its a bit urgent.I couldnt find anything related to display of geojson co-ordinates on map as graphic. Please let me know if this will work or it works with only json format file. Iam using 3.26 version javascript api.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2018 12:25:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-graphic-from-coordinates-of-json-file-onto/m-p/147804#M13779</guid>
      <dc:creator>charmilakondayagunta</dc:creator>
      <dc:date>2018-11-20T12:25:31Z</dc:date>
    </item>
  </channel>
</rss>

