I followed this guide: Additional configuration - Get Started | ArcGIS for State Government
It works like a charm and makes a dynamic legend so if you update your map, you don't have to update the Legend graphic.
I can't figure out how to get a Legend Icon made, though. I'm getting a red X where the icon should be.
Hi Tom,
Where are you adding this img tag to show it on the help screen? Are you adding tag to the Finder.json file in the section where you are able to modify the text for the help?
I ended up figuring out how to write a legend icon- here's the code (you can use this in conjunction with the Guide from my original post).
"iconJson": "[{'shape':{'type':'rect','x':2,'y':2,'width':4,'height':4,'r':0},'stroke':{'type':'stroke','color':{'r':0,'g':0,'b':0,'a':1},'style':'solid','width':2,'cap':'butt','join':4}},{'shape':{'type':'rect','x':2,'y':13,'width':4,'height':4,'r':0},'stroke':{'type':'stroke','color':{'r':0,'g':0,'b':0,'a':1},'style':'solid','width':2,'cap':'butt','join':4}},{'shape':{'type':'rect','x':2,'y':24,'width':4,'height':4,'r':0},'stroke':{'type':'stroke','color':{'r':0,'g':0,'b':0,'a':1},'style':'solid','width':2,'cap':'butt','join':4}},{'shape':{'type':'rect','x':12,'y':2,'width':16,'height':4,'r':0},'stroke':{'type':'stroke','color':{'r':0,'g':0,'b':0,'a':1},'style':'solid','width':2,'cap':'butt','join':4}},{'shape':{'type':'rect','x':12,'y':13,'width':16,'height':4,'r':0},'stroke':{'type':'stroke','color':{'r':0,'g':0,'b':0,'a':1},'style':'solid','width':2,'cap':'butt','join':4}},{'shape':{'type':'rect','x':12,'y':24,'width':16,'height':4,'r':0},'stroke':{'type':'stroke','color':{'r':0,'g':0,'b':0,'a':1},'style':'solid','width':2,'cap':'butt','join':4}},]",
In my case I need to embed an image on the Help screen likeTom. Adding the Legend widget does not work for my app since the layers I need for the legend are from a tiled service. I just cant figure out where to put the <src > tag to embed the image.
Gotcha. You do that in the application configuration. Here's a picture of the configuration editor (the right-hand panel)...It's in the same spot where you write your help text.
Just add text like: <img src="pic_mountain.jpg" alt="Mountain View" style="width:304px;height:228px">
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.