arcgis - point clustering in esri javascript api -
can each grouping have different colors in javascript?
var bluish = new picturemarkersymbol(picbaseurl + "bluepin1largeb.png", 32, 32).setoffset(0, 15); var greenish = new picturemarkersymbol(picbaseurl + "greenpin1largeb.png", 64, 64).setoffset(0, 15); var reddish = new picturemarkersymbol(picbaseurl + "redpin1largeb.png", 72, 72).setoffset(0, 15); renderer.addbreak(0, 2, blue); renderer.addbreak(0, 2, green); renderer.addbreak(2, 1001, red); var newcolor=[]; newcolor.push(blue); newcolor.push(green);
can utilize both bluish , and greenish in same render based on case (if condition)?renderer.addbreak(0, 2, newcolor);
yes should able manage updatng breaks need to.
looking @ esri classbreakredered class here: https://developers.arcgis.com/javascript/jsapi/classbreaksrenderer-amd.html
you can clear existing breaks when need alter colours calling clearbreaks() re-add breaks need new color e.g. green. same colour multiple breaks fine well.
javascript arcgis esri arcgis-js-api
No comments:
Post a Comment