Select to view content in your preferred language

Getting Drawing Images (or URLs) for Non-Picture Marker Symbols

899
2
05-19-2010 05:09 PM
AdamPfister
Esri Contributor
Is there any way to make a request for a layer's drawing information and get back the actual image (or url) for a Simple Marker/Line/Polygon/etc symbol?  This is easily done for a Picture Marker because the url is returned but for any other type, only the marker information is returned. 

I'm trying to use this information to create a dynamic legend TOC so I would need some image to use unless there is a way to construct the graphic from the info and turn that into an image?

For example.  This returns a nice image url to use:
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/MapServer/0?f=pjson

This, however, only returns the graphic information:
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/MapServer/1?f=pjson

What request is sent while using the Template Picker?  That returns an image for Simple Symbols....

Thanks,
Adam
0 Kudos
2 Replies
ReneeMaxwell
Regular Contributor
Did you ever figure this out? I'm attempting something similar and not having much luck.

Thanks!
0 Kudos
AdamPfister
Esri Contributor
I ended up using the esri.symbol.getShapeDescriptors() method.  I followed the sample code here, http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/namespace_symbol.htm, to get it working correctly.

Good luck!
0 Kudos