luquettacwb

How to create a color ramp to change the color of a svg image in javascript api

Discussion created by luquettacwb on Jan 8, 2014
Latest reply on Jun 17, 2014 by g3r4n
I have a svg image to create a PictureMarkerSimbol for a feature. How to create a color ramp to change the svg color based on a criteria, like a attribute on my feature?

The ideia is like that:

var mySymbol = new esri.symbol.PictureMarkerSymbol("../resources/img/myimage.svg", 32, 32).setOffset(0, 8);
var renderer = new esri.renderers.SimpleRenderer(mySymbol);

renderer.changeColor ( field, colors, criteria )


Thanks in advanced

Outcomes