Select to view content in your preferred language

Replace Legend data from ArcGIS Server with simplemarker symbol

4110
11
11-24-2015 07:25 AM
MosesAsuquo
Deactivated User

Hello,

I want to replace the symbol of some feature layer legend symbology that comes from the ArcGIS server legend url with simplemarker symbol defined in json in my app.config  in javascript code. I am able to get the legend symbol using ajax call to the legend on the REST endpoint EST endpoint (.../MapServer/legend?f=pjson) to obtain the necessary info including the symbol img src and content in base 64 encrypted data. However, i want to replace the symbol with a custom simplemarker symbol that i have defined in my appconfig for some specific feature layers. However when i assign the simplemarker symbol to the legend.legenddata the symbol does not show on the legend table of content as expected. I am not sure what is missing.

{

"type": "esriSMS",

"style": "esriSMSSquare",

"color": [76,115,0,255],

"size": 8,

"angle": 0,

"xoffset": 0,

"yoffset": 0

}

Any useful advice will be greatly appreciate. Thank you in advance.

Tags (2)
0 Kudos
11 Replies
RobertScheitlin__GISP
MVP Emeritus

Moses,

   Don't get hung up on the fact that the sample uses class break renderer. You can do the same using a simple renderer. The point is you can use drawingOptions to change the renderer that is returned from ArcGIS Server.

0 Kudos
MosesAsuquo
Deactivated User

I will give this a shot and i will let you know if it works. Give me a few Thanks.

0 Kudos