Solved! Go to Solution.
import com.esri.viewer.AppEvent;
private function showLocation(data:Object):void { hideInfoWindow(); graphicsLayer.clear(); var ptGraphic:Graphic = new Graphic(); ptGraphic.geometry = data.point; graphicsLayer.add(ptGraphic); var popUpInfo:PopUpInfo = new PopUpInfo(); popUpInfo.title = data.title; popUpInfo.description = data.content; var infoWindowRenderer:ClassFactory = new ClassFactory(PopUpRenderer); infoWindowRenderer.properties = { popUpInfo: popUpInfo }; graphicsLayer.infoWindowRenderer = infoWindowRenderer; popUpRenderer.popUpInfo = popUpInfo; popUpRenderer.graphic = ptGraphic; if (map.scale > zoomScale) { map.scale = zoomScale; } map.centerAt(data.point); infoWindowShow(); //Added Code var data:Object = { id: widgetId, state: "minimized" } AppEvent.dispatch(AppEvent.WIDGET_CHANGE_STATE, data); //End Added Code }
ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_CHANGE_STATE, data2));
import com.esri.viewer.ViewerContainer;