+ Reply to Thread
Results 1 to 7 of 7

Thread: Getting the current state of the map as json

  1. #1
    Damian Schroder
    Join Date
    Jul 2010
    Posts
    12
    Points
    0
    Answers Provided
    0


    0

    Default Getting the current state of the map as json

    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.
    Last edited by DamianSchroder; 05-02-2012 at 12:44 PM.

  2. #2
    Jennifer Nery

    Join Date
    May 2010
    Posts
    2,449
    Points
    289
    Answers Provided
    51


    0

    Default Re: Getting the current state of the map as json

    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/h...m#ExportWebMap
    Jennifer Nery
    Software Developer
    ArcGIS API for SL/WPF/WP7

  3. #3
    Damian Schroder
    Join Date
    Jul 2010
    Posts
    12
    Points
    0
    Answers Provided
    0


    0

    Default Re: Getting the current state of the map as json

    Thanks for the response.

  4. #4
    Damian Schroder
    Join Date
    Jul 2010
    Posts
    12
    Points
    0
    Answers Provided
    0


    0

    Default Re: Getting the current state of the map as json

    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

  5. #5
    Damian Schroder
    Join Date
    Jul 2010
    Posts
    12
    Points
    0
    Answers Provided
    0


    0

    Default Re: Getting the current state of the map as json

    Yep. I went back an re-examined the prerequisites and noticed I needed Silverlight 5 Tools for VS.

  6. #6
    Jennifer Nery

    Join Date
    May 2010
    Posts
    2,449
    Points
    289
    Answers Provided
    51


    0

    Default Re: Getting the current state of the map as json

    You can run Fiddler along with this SDK sample: http://resourcesbeta.arcgis.com/en/h...m#ExportWebMap. Notice the Web_Map_JSON that is sent to the print tool includes the layers and map's extent, scale, etc.
    Jennifer Nery
    Software Developer
    ArcGIS API for SL/WPF/WP7

  7. #7
    Damian Schroder
    Join Date
    Jul 2010
    Posts
    12
    Points
    0
    Answers Provided
    0


    0

    Default Re: Getting the current state of the map as json

    Thanks. Are graphics, like user markup, supported yet or is that a work in progress?

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts