Pop-up windows
http://resources.arcgis.com/en/help/flex-viewer/concepts/
Starting with version 2.3 we recommend you take advantage of the new pop-up windows instead of SimpleInfoWin and Info Popup widgets.
Pop-up windows provides functionality that is conceptually similar to the Identify tool in ArcMap. It enables data to be displayed in the Viewer presented as a "popup" window that is associated with a feature in the map display. The pop-up window works with tiled and dynamic map services as well as with feature layers. See pop-up configuration files for examples and more information.
Pop-ups | SimpleInfoWin | |
---|---|---|
Layer types supported | "dynamic" "tiles" "feature" | "feature" |
Aliasing of fields | Yes, both alias from the map service, as well as configured for the viewer. | No |
Number formatting | Yes. | Yes |
Date formatting | Yes | No |
Templating and free form descriptions | Yes | No |
Part of the API | Yes (version 2.3 and later) | No. Implemented as separate widget. |
Version support: | Added in version 2.3. | Deprecated in version 2.3. |
Syntax in main configuration file | <layer ...
popupconfig="sample.xml"/>
| <layer ...
info="SimpleInfoWinWidget.swf
infoconfig="sample.xml"/>
|
There are three different types of Info Popup widgets:
- Standard pop-up windows. New in version 2.3 of the API.
- Simple Info Window Widget - Used for features in operational layers.
- Info Popup Widget - Used with returned features from the GeoRSS, Locate, Query, or Search widgets.
As the names suggest, the major difference between the two latter types of Info Popup widgets is the type of data they can display. Simple Info Window Widget is generally used to only display simple attribute data. Info Popup Widget can display attribute data, plus it supports link fields - fields that contain URLs to additional data or images.
Simple Info Window Widget XML configuration file code sample:
<configuration>
<fields>type, description</fields>
<titlefield>type</titlefield>
<datefield></datefield>
<zoomscale>150000</zoomscale>
</configuration>
Info Popup Widget XML configuration file code sample:
<configuration>
<fields>type, description</fields>
<titlefield>type</titlefield>
<linkfield>type</linkfield>
<datefield></datefield>
<zoomscale>150000</zoomscale>
</configuration>
The new pop-up functionality replaces the SimpleInfoWin and Info Popup widgets. These widgets are still included, but are being deprecated and are not used in any example configuration files. You may however still use the info/infoconfig attributes for a widget, this functionality is not being deprecated.
Configuration file for deprecated SimpleInfo and InfoPopup widgets
The general structure of the Info Popup widget configuration file is shown by the conceptual graphic below.
The file is defined by a <configuration> tag that identifies it as a configuration file for the Viewer. It supports editing the content of the Info Popup window.
It has the following child tags:
- <fields> - Comma separated list of field names.
- <titlefield> - This field name becomes the Info window title.
- <datefields> - Comma separated list of date field names.
- <linkfield> - Only applicable for Info Popup Widgets (which is being deprecated as of version 2.3). Refers to a field that contains URL values. If the URL link has an extension .JPG, .PNG or .GIF, then the image is displayed, otherwise a clickable link is displayed. When the link is clicked a new tab opens to display content that is referenced by the link.
- <zoomscale> - Defined zoom scale to the location of the returned list item.
- <zoomlabel> - Only applicable to SimpleInfoWin widget (which is being deprecated as of version 2.3). Label to show for the "Zoom to" label (default for English is "Zoom to").