No worries...thanks!
Thanks Joe. I'm literally amazed that this is still a thing. 🙂 I don't work on this stuff anymore, but I remember seeing the webmap functionality when it was first introduced and being blown away. I expected to have to knock some rough edges like this off in the early versions, but it seems like Esri have left this to wither. Bit of a shame, cos we did some cool (for us) stuff with it. 🙂
Hi Christopher,
I'm so sorry - I just got notified of your reply. Yes, that's exactly the JSON I meant. And as for commenting out the feature symbol, it's been so long since I've done this... If you pretty format Web_Map_as_JSON, I'm pretty sure you'll see the feature symbol I'm talking about. Sorry I can't be more detailed. Just either remove that from the feature, or literally insert commenting around it in the text. Your aim is simply to get rid of its overriding effects.
Frank
Thanks for this Frank!
I was having trouble changing the legend label (override 1) generated by the print task for a jimu/DrawBox graphic which is being used to show the 'area of interest' in the map.
If anyone else has trouble modifying the legend for DrawBox layers, here is the code I used in the "draw-end" event of the drawBox:
<SPAN class="keyword token">var</SPAN> simpleJson <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="string token">"type"</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="string token">"simple"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"label"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"Area de Interés"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"symbol"</SPAN><SPAN class="punctuation token">:</SPAN><SPAN class="punctuation token">{</SPAN> <SPAN class="string token">"color"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">112</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">255</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">64</SPAN> <SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"outline"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN> <SPAN class="string token">"color"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">0</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="number token">255</SPAN> <SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"width"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">1</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"type"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"esriSLS"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"style"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"esriSLSSolid"</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"type"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"esriSFS"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"style"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"esriSFSSolid"</SPAN> <SPAN class="punctuation token">}</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">var</SPAN> drawboxRenderer <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">SimpleRenderer</SPAN><SPAN class="punctuation token">(</SPAN>simpleJson<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>drawBox<SPAN class="punctuation token">.</SPAN>drawLayer<SPAN class="punctuation token">.</SPAN>graphics<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN>symbol <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>drawBox<SPAN class="punctuation token">.</SPAN>drawLayer<SPAN class="punctuation token">.</SPAN>graphics<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN>_graphicsLayer<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setRenderer</SPAN><SPAN class="punctuation token">(</SPAN>drawboxRenderer<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>drawBox<SPAN class="punctuation token">.</SPAN>drawLayer<SPAN class="punctuation token">.</SPAN>graphics<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN>_layer<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setRenderer</SPAN><SPAN class="punctuation token">(</SPAN>drawboxRenderer<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Hopefully this might be helpful for somebody,
Cheers,
Joe
Hi, Frank. I know that it has been a while since you posted this, but I just wanted some clarification.
Do you mean to modify the JSON in the "Web_Map_as_JSON" object?
And where did you mean to comment out the "feature symbol". In that same object?
Thanks...Chris
Did you ever figure this out? I'm having the same issue.
graphic = new Graphic(); graphic.geometry = new MapPoint(rlt.localX, rlt.localY, usedSRS); graphic.symbol = new PictureMarkerSymbol(markerImage); graphic.toolTip = rlt.bezeichnung; graphic.name = rlt.typ; graphic.accessibilityDescription = rlt.typ; graphic.accessibilityName = rlt.typ; graphic.className = rlt.typ; graphic.automationName = rlt.typ;
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.