AnsweredAssumed Answered

Selected symbol not changing color

Question asked by krank42 on Sep 19, 2016
Latest reply on Sep 20, 2016 by krank42

Hi there,

 

I want to change the selected symbols depending on the geometry of the feature layer. My code looks like that:

switch (geoType) {
case "esriGeometryPoint":
selectionSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 20);
break;

case "esriGeometryPolygon":
layer.selectionSymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASHDOT,
new Color([255, 120, 0]), 2), new Color([255, 255, 0, 0.5]));
break;

case "esriGeometryPolyline":
layer.selectionSymbol = new CartographicLineSymbol(CartographicLineSymbol.STYLE_SOLID, new Color([255,255,255,1]), 2);

}

layer.setSelectionSymbol(selectionSymbol);

 

The marker symbol for point geometry changes, the others get transparent?

 

Where is the error?

 

Thank you 

Karsten

Outcomes