Solved! Go to Solution.
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;
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
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
No worries...thanks!
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:
var simpleJson = {
"type":"simple",
"label": "Area de Interés",
"symbol":{
"color": [
0,
112,
255,
64
],
"outline": {
"color": [
0,
0,
0,
255
],
"width": 1,
"type": "esriSLS",
"style": "esriSLSSolid"
},
"type": "esriSFS",
"style": "esriSFSSolid"
}
};
var drawboxRenderer = new SimpleRenderer(simpleJson);
this.drawBox.drawLayer.graphics[0].symbol = null;
this.drawBox.drawLayer.graphics[0]._graphicsLayer.setRenderer(drawboxRenderer);
this.drawBox.drawLayer.graphics[0]._layer.setRenderer(drawboxRenderer);
Hopefully this might be helpful for somebody,
Cheers,
Joe
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. 🙂