Hello Robert,
I am currently using your identify widget, and I have a question regarding modifying it. How do I modify the code in Widget.js to allow the fill in selected polygons to remain without disappearing when I select another polygon? Currently I have modified the widget to have a ongoing list so that I can add and remove multiple polygons from the map to the results list as well as removing them. So I just need the map to also reflect which polygons have been selected using the polygon fills, and remove them when their results are removed as well.
Thank you for your assistance,
Shamnas
Solved! Go to Solution.
Shammas,
That is because the draw tool uses the same graphics layer in the _onDrawEnd function. You would need to make this change:
_onDrawEnd:function(graphic, geotype, commontype){
this._hideInfoWindow();
this.drawBox.clear();
this.map.graphics.clear();
this.map.graphics.add(graphic);
...
Shammas,
Just look for
this.graphicsLayer.clear();
Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.
Shammas,
That is because the draw tool uses the same graphics layer in the _onDrawEnd function. You would need to make this change:
_onDrawEnd:function(graphic, geotype, commontype){
this._hideInfoWindow();
this.drawBox.clear();
this.map.graphics.clear();
this.map.graphics.add(graphic);
...
Thank you so much! That helped me a lot.