I am looking for a way to change the color of a text symbol when user clicks on it. So far I have tried the following code, but it doesn't work:
graphicsLayer.on("click", function (evt) {
evt.graphic.symbol.setColor(new Color([0, 255, 255]));
}
Is there anything I'm missing?
Solved! Go to Solution.
Try redrawing the graphics layer after you change the color. For example:
e.graphic.symbol.setColor("blue");
graphicsLayer.redraw();
Try redrawing the graphics layer after you change the color. For example:
e.graphic.symbol.setColor("blue");
graphicsLayer.redraw();