Select to view content in your preferred language

popup window in viewer 2.5

800
2
Jump to solution
02-28-2012 08:08 AM
MattPohl
Frequent Contributor
Hello everyone,

I am new to the world of flex and also to the viewer. I have had much success however getting things to work and have made some very useful applications, yet I am having difficulty getting popups to work correctly. In fact I can not get them to show up at all. I am using a tiled service, and have created a very simple popup xml just for testing purposes. I know that whatever I am doing wrong is probably simple, and actually I hope that is the case. Any help would be greatly appreciated. The following code is what I am using. Thanks

Matt


Main config file:

<operationallayers>
     <layer label="Attendance Areas" type="tiled" visible="true" alpha="0.5"
              popupconfig="popups/PopUp_AttendencArea.xml"
              url="http://arcgisserver/ArcGIS/rest/services/MoundsView/AttendanceAreas/MapServer"/>
</operationallayers>


Popup config file:

<?xml version="1.0" ?>
<configuration>
    <title>{NAME}</title>
     <fields>
        <field name="NAME"/>
     </fields>
</configuration>
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Matt,

   First thing is you are posting to the wrong forum. When you have Flex Viewer and or Widget questions you need to post to the Flex Viewer forum:

http://forums.arcgis.com/forums/111-ArcGIS-Viewer-for-Flex

Next your error is simple you are defining a popup for the WHOLE tiled map service which you can not do you have to set the popup for a specific sublayer.

Documentation here:
http://help.arcgis.com/en/webapps/flexviewer/help/01m3/01m30000000p000000.htm

Child tag specific to layers of types dynamic and tiles<sublayer> supports the following attributes:


  • id???The ID, usually a number, of the sublayer within the map service.

  • popupconfig???URL to the .xml configuration file of the pop-up window. See Pop-up configuration files for more information. [Added in version 2.3]

  •   definitionexpression???Limits the data to a subset of the available  features in the map service layer. It's similar to the definition query  for a layer in ArcMap.



It will look something like this:

            <layer label="San Francisco 3-1-1 Incidents 2" type="dynamic" visible="false" alpha="1.0"                    url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/MapServer"                    visiblelayers="0">                    <sublayer id="0" popupconfig="popups/PopUp_311.xml" />             </layer>


Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below:

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Matt,

   First thing is you are posting to the wrong forum. When you have Flex Viewer and or Widget questions you need to post to the Flex Viewer forum:

http://forums.arcgis.com/forums/111-ArcGIS-Viewer-for-Flex

Next your error is simple you are defining a popup for the WHOLE tiled map service which you can not do you have to set the popup for a specific sublayer.

Documentation here:
http://help.arcgis.com/en/webapps/flexviewer/help/01m3/01m30000000p000000.htm

Child tag specific to layers of types dynamic and tiles<sublayer> supports the following attributes:


  • id???The ID, usually a number, of the sublayer within the map service.

  • popupconfig???URL to the .xml configuration file of the pop-up window. See Pop-up configuration files for more information. [Added in version 2.3]

  •   definitionexpression???Limits the data to a subset of the available  features in the map service layer. It's similar to the definition query  for a layer in ArcMap.



It will look something like this:

            <layer label="San Francisco 3-1-1 Incidents 2" type="dynamic" visible="false" alpha="1.0"                    url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/MapServer"                    visiblelayers="0">                    <sublayer id="0" popupconfig="popups/PopUp_311.xml" />             </layer>


Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below:
0 Kudos
MattPohl
Frequent Contributor
Robert-

Thanks for the quick reply and for the solution. Works great, and it makes complete sense now that you explained it.
0 Kudos