private function activateIdentifyTool(event:MouseEvent, lTool:String = ""):void { addSharedData("Deactivate_DrawTool", null); // to be able to deactivate drawTool on other widgets // apply glow if(event){ selectedDrawingIcon = Image(event.currentTarget); }else{ switch(lTool){ case DrawTool.EXTENT : { selectedDrawingIcon = iDrawExt; break; } case DrawTool.POLYGON : { selectedDrawingIcon = iDrawPoly; break; } case DrawTool.MAPPOINT : { selectedDrawingIcon = iDrawPnt; break; } case DrawTool.POLYLINE : { selectedDrawingIcon = iDrawLine; break; } default: { selectedDrawingIcon = iDrawPnt; } } } clearSelectionFilter(); selectedDrawingIcon.filters = [ glowFilter ]; var status:String; var value:String = selectedDrawingIcon.name; lastTool = selectedDrawingIcon.name; setMapNavigation("none", ""); switch (value) { case DrawTool.MAPPOINT: { status = pointLabel; setMapAction(DrawTool.MAPPOINT, status, identMarkerSymbol, drawEnd, false); break; } case DrawTool.POLYLINE: { status = lineLabel; setMapAction(DrawTool.POLYLINE, status, identLineSymbol, drawEnd, false); break; } case DrawTool.EXTENT: { status = rectLabel; setMapAction(DrawTool.EXTENT, status, identFillSymbol, drawEnd, false); break; } case DrawTool.POLYGON: { status = polyLabel; setMapAction(DrawTool.POLYGON, status, identFillSymbol, drawEnd, false); break; } } }
Eric, Clearing the results on widget close would be as simple as adding the clear(); function to the widgetClosedHandler... private function widgetClosedHandler(event:Event):void { clear(); setMapAction(null, null, null, null); graphicsLayer.visible = false; hideInfoWindow(); setMapNavigation(null, null); if (selectedDrawingIcon) selectedDrawingIcon = null; }Your second request just as simple 2 lines this time: private function widgetOpenedHandler(event:Event):void { if(graphicsLayer) graphicsLayer.visible = true; if (autoActivatedTool != "" ) activateIdentifyTool(null, autoActivatedTool); }
private function widgetClosedHandler(event:Event):void { clear(); setMapAction(null, null, null, null); graphicsLayer.visible = false; hideInfoWindow(); setMapNavigation(null, null); if (selectedDrawingIcon) selectedDrawingIcon = null; }
private function widgetOpenedHandler(event:Event):void { if(graphicsLayer) graphicsLayer.visible = true; if (autoActivatedTool != "" ) activateIdentifyTool(null, autoActivatedTool); }
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.