DSMapper

Best method for forming JSON for Export Web Map (Printing) task

Discussion created by DSMapper on Aug 24, 2012
Latest reply on Sep 13, 2012 by ahoque-esristaff
Hi,

Can anyone suggest the best way to generate the JSON ("Web_Map_as_JSON" parameter) for a call to the REST API for the Export Web Map printing task?  I need to be able to programatically generate the JSON based on a number of changing configuration options.

It seems like I have a few options:
- Manually construct the JSON string myself.
- Create my own set of classes to represent each parameter (mapOptions, operationalLayers, etc), and use JSON serialization.
- Does ESRI already provide a class library that supports this?  ArcGIS Runtime for WPF perhaps?

Here's what I'm trying to do:
I want to create a .NET 3.5 class library (no user interface) that can be called repeatedly by the rest of my application whever a static map image is needed.   The caller will pass in some feature identifier, and my library will use the REST APIs to locate the feature and return the map image zoomed into the feature.

Thanks!

Outcomes