Skip to main content
edited tags
Link
Sam007
  • 4.4k
  • 7
  • 51
  • 70
deleted 7 characters in body; edited title
Source Link
whuber
  • 70.2k
  • 16
  • 187
  • 282

how How to change a FeatureLayer's symbols?

I did i like this:

dojo.connect(featureLayer, "onUpdateEnd", function() {
        var defaultSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([0,0,255]));
        dojo.forEach(this.graphics, function(graphic){
                graphic.setSymbol(defaultSymbol);
            });
});

Yet I'm not satisfied with this solution because when I add new features to the layer they are added with a default symbol (black circle). Do you know how to set up symbols for the layer once and foreverfor all?

how to change FeatureLayer's symbols?

I did i like this:

dojo.connect(featureLayer, "onUpdateEnd", function() {
        var defaultSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([0,0,255]));
        dojo.forEach(this.graphics, function(graphic){
                graphic.setSymbol(defaultSymbol);
            });
});

Yet I'm not satisfied with this solution because when I add new features to the layer they are added with default symbol (black circle). Do you know how to set up symbols for the layer once and forever?

How to change a FeatureLayer's symbols?

I did this:

dojo.connect(featureLayer, "onUpdateEnd", function() {
        var defaultSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([0,0,255]));
        dojo.forEach(this.graphics, function(graphic){
                graphic.setSymbol(defaultSymbol);
            });
});

I'm not satisfied with this solution because when I add new features to the layer they are added with a default symbol (black circle). Do you know how to set up symbols for the layer once and for all?

Source Link
Kirill Lykov
  • 689
  • 1
  • 10
  • 19

how to change FeatureLayer's symbols?

I did i like this:

dojo.connect(featureLayer, "onUpdateEnd", function() {
        var defaultSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([0,0,255]));
        dojo.forEach(this.graphics, function(graphic){
                graphic.setSymbol(defaultSymbol);
            });
});

Yet I'm not satisfied with this solution because when I add new features to the layer they are added with default symbol (black circle). Do you know how to set up symbols for the layer once and forever?