All,I am trying to add an icon to the navigation widget that opens up the identify widget, i.e:[ATTACH=CONFIG]20812[/ATTACH]I have managed to do this by adding the following to the navigation.mxml:in the array collection for the images added:
<s:ArrayCollection>
<fx:Object action="pan" imageIcon="assets/images/i_pan.png" label="{LocalizationUtil.getDefaultString('panLabel')}"/>
<fx:Object action="zoomin" imageIcon="assets/images/i_zoomin.png" label="{LocalizationUtil.getDefaultString('zoomInLabel')}" visible="false"/>
<fx:Object action="zoomout" imageIcon="assets/images/i_zoomout.png" label="{LocalizationUtil.getDefaultString('zoomOutLabel')}"/>
<fx:Object action="identify" imageIcon="assets/images/i_identify.png" label="Identify" />
</s:ArrayCollection>
and then changed the doNavAction function to the following:
private function doNavAction(action:String, label:String):void
{
var data:Object =
{
tool: action,
status: label
}
if(data.tool == "identify")
{
AppEvent.dispatch(AppEvent.WIDGET_RUN, ViewerContainer.getInstance().widgetManager.getWidgetId("Identify"));
AppEvent.dispatch(AppEvent.SET_MAP_NAVIGATION, {tool: "Pan",status: "Pan"});
}
else
{
AppEvent.dispatch(AppEvent.SET_MAP_NAVIGATION, data);
}
}
This opens up the identify widget as expected and sets the map navigation back to pan, but unfortunatly it does not change the selected icon to the pan icon, how can I represent a mouse click on the pan icon using code,RegardsAnthony