Getting the current state of the map as json

2120
6
05-02-2012 11:36 AM
DamianSchroder
New Contributor
I want to use the  Export Web Map Task gp service with the silverlight viewer. The Web_Map_as_JSON parameter is eluding me. How does one get the current map as json for the purposes of passing it in as the Web_Map_as_JSON parameter for the Export Web Map Task? Thanks.
0 Kudos
6 Replies
JenniferNery
Esri Regular Contributor
You can accomplish this by using PrintTask in our API. While you will not have access to the Webmap_JSON, this GP parameter is created for you. See this SDK sample: http://resourcesbeta.arcgis.com/en/help/silverlight-api/samples/start.htm#ExportWebMap
0 Kudos
DamianSchroder
New Contributor
Thanks for the response.
0 Kudos
DamianSchroder
New Contributor
I was not able to access the ESRI.ArcGIS.Client.Printing.dll. I have tried both ArcGISSilverlight30_prerelease.exe and ArcGISSilverlight30_beta2.exe (from Dev Summit) versions of the API. In both cases, when adding a reference to the project the ESRI.ArcGIS.Client library does not show in the list of available options. I browsed to the dll but when running the project I get the dreaded:
The type or namespace name 'ESRI' could not be found (are you missing a using directive or an assembly reference?)

I have tried several iterations of uninstall, install and repair, however, Visual Studio doesn't pick it up in the list of available references.

I am successful with the ArcGISSilverlight24.exe (ArcGIS API for Silverlight v2.4), but of course it does not contain the ESRI.ArcGIS.Client.Printing.dll. I noticed this install gives an extra screen (Select Features) during install. It shows Silverlight as the features that will be installed, where the 3.0 install did not have this screen.

I feel like I must be missing a prerequisite or I do not have the latest flavor of the beta 3.0 api. Any assistance would be greatly appreciated. Thanks- Damian
0 Kudos
DamianSchroder
New Contributor
Yep. I went back an re-examined the prerequisites and noticed I needed Silverlight 5 Tools for VS.
0 Kudos
JenniferNery
Esri Regular Contributor
You can run Fiddler along with this SDK sample: http://resourcesbeta.arcgis.com/en/help/silverlight-api/samples/start.htm#ExportWebMap. Notice the Web_Map_JSON that is sent to the print tool includes the layers and map's extent, scale, etc.
0 Kudos
DamianSchroder
New Contributor
Thanks. Are graphics, like user markup, supported yet or is that a work in progress?
0 Kudos