ExportWebMap - drawing labels for point graphics

3522
2
02-21-2012 01:37 PM
by Anonymous User
Not applicable
Working with the ExportWebMap service in 10.1 Beta 2, I've so far been able to figure out on how to construct the JSON to do what I want through a combination of the REST API and ExportWebMap Spec doc, and tracing the 10.1 JS Print sample using Fiddler. However I�??ve hit a block today that I need some help getting through..

What I need to do is drive the ExportWebMap service to draw a map graphics layer �?? simple points in this case, but then label those points. So nothing actually being served from ArcGIS Server �?? all geometry and attributes specified in the JSON sent to the service. I�??ve had success using the labelingInfo element on a dynamic layer drawing polygons with a unique values renderer (attached file JSON_ExportWebMap_Label_Hornsby.txt)

The other attached file (JSON_FeatureCollection_Label.txt) is where I�??m at trying to send a point feature collection with labels. I get the points �?? not the labels.  Params I�??m sending  in addition to this JSON are format=PNG32, lauout template=MAP_ONLY, spatial refs=4326.

Any input on where I've gone wrong with the JSON would be much appreciated.

Thanks & regards,
Josh
0 Kudos
2 Replies
by Anonymous User
Not applicable
Original User: fcbassongis

I have a similar scenario and get the same results as you have described - graphics draw, but no labels.  Also see this forum topic: http://forums.arcgis.com/threads/61448-Problen-with-the-Print-Task.
0 Kudos
TanuHoque
Esri Regular Contributor
Josh,
Currently LabelinglInfo is not supported for layers in featureCollection (aka graphic layers).

to draw labels on top of features, you need to have a separate layer (of point type) inside the featureCollection with geometries defining the location where labels will be drawn and text symbols.

Here i have attached a json (modified version of yours) that shows how to draw labels.

I have also attached the output from a printing service using the json.

Thanks.
Tanu
0 Kudos