function initSelectToolbar(event) { selectionToolbar = new Draw(event.map); var selectQuery = new Query(); on(selectionToolbar, "DrawEnd", function (geometry) { selectionToolbar.deactivate(); selectQuery.geometry = geometry; featureLayer.selectFeatures(selectQuery, FeatureLayer.SELECTION_NEW); var symbol; selectionToolbar.deactivate(); map.showZoomSlider(); symbol = new SimpleFillSymbol("none", new SimpleLineSymbol("dashdot", new Color([255, 0, 0]), 2), new Color([255, 255, 0, 0.25])); alert(geometry.type); var graphic = new Graphic(geometry, symbol); map.graphics.add(graphic); }); }
Solved! Go to Solution.