3

I am generating a legend for a Silverlight map using the GetLegendInfo method in the ArcGIS 10 SOAP Web Services.

The array of MapServerLegendInfo objects that is returned does not contain annotation layers or raster layers that are in my map service. Does anyone know how I can get those layer types to return, or if there is a good workaround?

I know that the ESRI Silverlight API v2.1 contains it's own legend control, however I am not able to use that.

Thanks, Seth

  • Since there is no question, it is hard to form an answer. – mwalker Dec 3 '10 at 19:37
  • I edited the question to try to make it clearer. – Britt Wescott Dec 3 '10 at 19:40
2

GetLegendInfo is not going to let you get those layers by design:

Use GetLegendInfo to retrieve individual legend elements including the symbol image, labels, descriptions and headings. A common use would be to populate a table of contents. Note that composite layers such as group layers and annotation layers do not contain legend elements. To export a single image of the legend use ExportLegend on IMapServerLayout.

I cannot think of a workaround to this.

0

I think it would be possible to write a Server Object Extension (SOE) that does this.

I'd start out by writing an arcmap extension that serializes to a file, then once that's working, re-package it as an SOE.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.