<theme labelref="Unemployment" > <query layer="4" minscale="0" maxscale="25000001" legendurl="assets/images/Legend_unemp.png" > <!-- layer 4 is a state layer --> <listfields> <field name="NAME" alias="State" /> <field name="UNEMPRT_CY" alias="2009 Unemployment (%)" /> . . .
To achieve what you are trying, you will need to know the sublayer for which the popup is rendered.
This information is available in PopUpRendererSkin. You will have to dispatch an event from this skin that thematicQuery Widget would listen to and then based on the mapping of the layer and legend (defined in thematicQueryWidget's config) dispatch event for staticImage widget to show the url.
hope this helps....
Mehul