I'm trying to use the ArcGIS Flex SDK for a mobile app that will sometimes be used in environments with no connectivity. I've figured out that layers can be brought in locally by saving the JSON response given by the server and simply using the local file as the layer URL.

Is there a toolbox, plugin, or .py script that will take existing features or shapefiles and convert them to the ESRI JSON format that the server uses? I've tried esri2open, but that only does GeoJSON and a generic JSON object, and I'd prefer to have something that automatically gives the exact same JSON structure as the REST services would when loading an online map. Ideally, it would be something that could run from the Arc desktop without the additional steps of publishing a service and downloading the response. Does something like this exist? I've noticed that 10.2 may have that capability, but for now I'm stuck with 10.1.

  • Not exactly sure what are you trying to achieve (maybe you could make your question a bit shorter and clearer?), but there are GP tools for converting features to JSON and back (resources.arcgis.com/en/help/main/10.2/index.html#/…). This means you can convert the service map layer into a geodatabase feature class. Alternatively, when you have your features in a gdb, you can convert them into json which can be read/used by other applications. – Alex Tereshenkov May 1 '14 at 15:58
  • Right, I've gotten them to convert to JSON, but the Arc Flex SDK expects a very specific structure to the JSON (certain metadata field names, etc) in order to display a layer, and the available tools simply make a JSON representation of the existing structure. What I'm trying to do really is "fake it" by using a local JSON file to define the layer instead of a response from the server. – nerdabilly May 1 '14 at 16:49
  • Got it. I am not sure what type of JSON file you expect, but maybe you could take a look at github.com/Esri/geojson-utils, geojson and esri json convertation. But I am sure someone else will drop a useful tip soon. – Alex Tereshenkov May 1 '14 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.