Kim,
The selection symbol is set per layer normally so it will take some code changes in the edit widget to handle this:
define([
'esri/Color',
'esri/symbols/SimpleMarkerSymbol',
'esri/symbols/SimpleLineSymbol',
'esri/symbols/SimpleFillSymbol',
....
Color, SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol
.....
beginEditingByFeatures: function(features, featureLayer) {
if(features.length === 0) {
return;
}
var firstFeaturePoint;
var firstFeature = features[0];
if(firstFeature.geometry.type === 'point') {
firstFeaturePoint = firstFeature.geometry;
} else {
firstFeaturePoint = firstFeature.geometry.getExtent().getCenter();
}
this._createOverDef.then(lang.hitch(this, function() {
if(this.state !== 'active') {
this.widgetManager.activateWidget(this);
}
array.forEach(this._jimuLayerInfos.getLayerInfoArray(), function(jimuLayerInfo) {
if(jimuLayerInfo.layerObject && jimuLayerInfo.layerObject.clearSelection) {
SelectionManager.getInstance().clearSelection(jimuLayerInfo.layerObject);
}
}, this);
var type = featureLayer.geometryType;
var selectionColor = new Color("#FF0000");
var defaultPointSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE,
16, null, selectionColor);
var defaultLineSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
selectionColor, 2);
var defaultFillSymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_NULL,
defaultLineSymbol, selectionColor);
if (type === 'esriGeometryPoint') {
featureLayer.setSelectionSymbol(defaultPointSymbol);
} else if (type === 'esriGeometryPolyline') {
featureLayer.setSelectionSymbol(defaultLineSymbol);
} else if (type === 'esriGeometryPolygon') {
featureLayer.setSelectionSymbol(defaultFillSymbol);
}
SelectionManager.getInstance().setSelection(featureLayer, features).then(lang.hitch(this, function() {
......