<?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 Map Service for AGOL using JSON in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-map-service-for-agol-using-json/m-p/47607#M4158</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Jeff, follow up question. What if I only want to get the data into ArcMap?&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, 15 Sep 2015 16:37:44 GMT</pubDate>
    <dc:creator>ChrisHolmes</dc:creator>
    <dc:date>2015-09-15T16:37:44Z</dc:date>
    <item>
      <title>Create Map Service for AGOL using JSON</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-map-service-for-agol-using-json/m-p/47603#M4154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a .json file which I would like to be able to import into ArcMap to then publish as a map service to AGOL. The format of the json file when I receive it is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[{"geometry":{"x":-5561.656,"y":5659411.683,"spatialReference":{"wkid":3776}},"attributes":{"EXTERNALNUM":"FILE1","STATUS":"OPEN","FILECLERK":"JANE DOE","RPID":1111111}},{"geometry":{"x":-4480.512000000001,"y":5671280.649,"spatialReference":{"wkid":3776}},"attributes":{"EXTERNALNUM":"FILE2","STATUS":"HOLD","FILECLERK":"BOB BROWN","RPID":2222222}}}]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible given the way the file is formatted? It doesn't seem to be formatted in a manner to work with the JSON toolset in ArcMap: &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/An_overview_of_the_JSON_toolset/001200000059000000/" title="http://resources.arcgis.com/en/help/main/10.2/index.html#/An_overview_of_the_JSON_toolset/001200000059000000/"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions appreciated,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2015 16:36:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-map-service-for-agol-using-json/m-p/47603#M4154</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2015-09-11T16:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create Map Service for AGOL using JSON</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-map-service-for-agol-using-json/m-p/47604#M4155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nothing? Anyone? I'm hoping I don't have to write something to reformat the json file. Do I need to see if the service that provides the file to me can format it differently?&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 15:30:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-map-service-for-agol-using-json/m-p/47604#M4155</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2015-09-14T15:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Create Map Service for AGOL using JSON</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-map-service-for-agol-using-json/m-p/47605#M4156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is your ultimate goal to display the data on a map in a web application using ArcGIS for JavaScript? This is what I would do...&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Put your JSON in the same directory on the web server as the rest of your web application.&lt;/LI&gt;&lt;LI&gt;In your JavaScript code, use &lt;A href="https://dojotoolkit.org/reference-guide/1.10/dojo/text.html"&gt;dojo/text&lt;/A&gt; to import the JSON file as a text string.&lt;/LI&gt;&lt;LI&gt;Use &lt;A href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse"&gt;JSON.parse&lt;/A&gt; to convert the JSON text into an array of Feature objects. The "reviver" function parameter should do the following:&lt;OL&gt;&lt;LI&gt;Check to see if the current value is an object with properties named "geometry" and "attributes".&lt;/LI&gt;&lt;LI&gt;Create a Graphic using the &lt;A href="https://developers.arcgis.com/javascript/jsapi/graphic-amd.html#graphic2"&gt;Graphic(json) constructor&lt;/A&gt;.&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/esri.geometry.webmercatorutils-amd.html#canproject"&gt;Test to see if your geometry can be projected to Web Mercator using webMercatorUtils&lt;/A&gt;.&lt;/LI&gt;&lt;LI&gt;If the test returns true, use the &lt;A href="https://developers.arcgis.com/javascript/jsapi/esri.geometry.webmercatorutils-amd.html#project"&gt;webMercatorUtils.project&lt;/A&gt; function to project the Graphic's geometry. If false, (meaning your spatial reference isn't supported by webMercatorUtils) use &lt;A href="http://proj4js.org/"&gt;proj4js&lt;/A&gt; to do the projection. (Once you've determined which method you need to use, you can remove the test code and go directly to the projection code.)&lt;/LI&gt;&lt;LI&gt;The reviver function should return the projected graphic.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Create a new &lt;A href="https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html#featurelayer2"&gt;FeatureLayer&lt;/A&gt; object. Use your array of features from the previous step to create an object for the &lt;EM&gt;featureCollectionObject&lt;/EM&gt; parameter.&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 16:37:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-map-service-for-agol-using-json/m-p/47605#M4156</guid>
      <dc:creator>JeffJacobson</dc:creator>
      <dc:date>2015-09-14T16:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Create Map Service for AGOL using JSON</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-map-service-for-agol-using-json/m-p/47606#M4157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the goal is to display the data on a map. Thanks for your input Jeff.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 20:40:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-map-service-for-agol-using-json/m-p/47606#M4157</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2015-09-14T20:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create Map Service for AGOL using JSON</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-map-service-for-agol-using-json/m-p/47607#M4158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Jeff, follow up question. What if I only want to get the data into ArcMap?&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, 15 Sep 2015 16:37:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-map-service-for-agol-using-json/m-p/47607#M4158</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2015-09-15T16:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create Map Service for AGOL using JSON</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-map-service-for-agol-using-json/m-p/47608#M4159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since this forum is for the ArcGIS API for JavaScript, it's likely that no one here will know the answer. Try posting in &lt;A href="https://community.esri.com/space/2087"&gt;Geoprocessing&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 18:21:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-map-service-for-agol-using-json/m-p/47608#M4159</guid>
      <dc:creator>JeffJacobson</dc:creator>
      <dc:date>2015-09-15T18:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Create Map Service for AGOL using JSON</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-map-service-for-agol-using-json/m-p/47609#M4160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I did have that thought. Thanks Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 18:31:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-map-service-for-agol-using-json/m-p/47609#M4160</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2015-09-15T18:31:40Z</dc:date>
    </item>
  </channel>
</rss>

