20 Replies Latest reply on May 3, 2012 1:54 AM by arcgismanager_

    Pop-up Windows in Flex Viewer 2.3

    gapierce
      Hi everyone,
      I am wondering if anyone can help me with this.  I have been trying for a few days now get the pop-up windows working in version 2.3 and have been having some trouble.  Below is my config.xml and pop-up.xml code for the operational layer.  The layer shows up fine in the viewer, I just can't get any pop-up window to show up when I click on the layer.  Any help would be much appreciated, thanks. 

      Here is the operational layer data for the config.xml file.

                  <layer label="GPS Points" type="dynamic" visible="false"
                         popupconfig="popups/PopUp_GPSPoints.xml"
                         url="http://gisserver/ArcGIS/rest/services/GPSPoints/MapServer/"/>

      And here is the PopUp_GPSPoints.xml file in it's entirety.

      <?xml version="1.0" ?>
      <configuration>
          <title>GPSPoints</title>    
          <fields>
              <field name="Name" alias="Name" visible="true"/> 
              <field name="Orig_File" alias="Original File" visible="true"/> 
          </fields>  
      </configuration>

      <!--
          Pop-up configuration file for:
          http://gisserver/ArcGIS/rest/services/GPSPoints/MapServer/
      -->


      Greg Pierce
      GIS Specialist
      Weber Basin Water Conservancy District
        • Re: Pop-up Windows in Flex Viewer 2.3
          rscheitlin
          Greg,

             When you are applying PopUps to a dynamic layer then you have to use sublayers

          <layer label="GPS Points" type="dynamic" visible="false"
          url="http://gisserver/ArcGIS/rest/services/GPSPoints/MapServer/">
              <sublayer id="0" popupconfig="popups/PopUp_GPSPoints.xml"/>
          </layer>
          • Re: Pop-up Windows in Flex Viewer 2.3
            gapierce
            Thanks for your quick response.  When I change the code to represent that, I am now getting an error that looks like this in the viewer:

            http response status: 200

            Fault code: Client.CouldNotDecode

            Fault info: Error #1085

            Fault details: null

            If I remove the last line of code in the example you supplied me with: </layer>, the error disappears, but I return to the point of not being able to get a pop-up window.  I know I'm doing something wrong.  Any further help is really appreciated.  Thanks.


            Edit:  I got it to work!  Thanks!  For some reason when copied and pasted just that line of code: </layer> from the original xml file that had the demographic data in it as an example it did not work.  But if I copied the whole layer data from that demographic layer, and then just modified it to fit my needs, it worked!  Thanks for your help Robert!  In addition I have one more question...  So in that particular map service there is only the one layer and that layer would have a default sublayer value of "0", correct?  In addition I am also bringing in other map services as operational layers that have multiple layers within them, ie: a secondary water map service that has valves, turnouts, pipelines, drains, etc.  How do i determine which number those are?  Should I start with "0" and move my way down the layers as they are organized in the map service mxd?  Thanks again for your help.
            • Re: Pop-up Windows in Flex Viewer 2.3
              rscheitlin
              Greg,

                 Just throw http://gisserver/ArcGIS/rest/services/GPSPoints/MapServer into your web browsers address bar and hit enter, and that will take you to the REST service directory for that map service and all the info you need is there.
              • Re: Pop-up Windows in Flex Viewer 2.3
                gapierce
                Awesome!  Thank you so much!  You're a lifesaver!
                • Re: Pop-up Windows in Flex Viewer 2.3
                  gapierce
                  Sorry to bother you again, but would you have any idea why some of my field values are not showing up in the pop-up window.  The field is listed there but there is no value associated with it and I know there must be for the feature to even be symbolized.  Case in point: our pipelines are symbolized based on a diameter field, so I know there is a value there, but when I add that diameter field to the pop-up xml file the field is listed in the viewer but there is no value next to it.  It is happening with a few different fields, and they vary from text fields to numerical.  It's not happening with all the fields, some values are showing up just fine, it's just these few.  If you'd like me to post any of the code, let me know.  Thanks.
                  • Re: Pop-up Windows in Flex Viewer 2.3
                    rscheitlin
                    Greg,

                        Best suggestion is to find one of those features that is not showing what is expected and determine the value of some unique field that way you can go to the REST service page and query that layer using that field and value and see what ArcGIS Server is returning for that record. If the query is returning null values also then open the MXD that the map service is coming from and Identify that feature to double check that there are actually values there.
                    • Re: Pop-up Windows in Flex Viewer 2.3
                      gapierce
                      Robert,
                      Ok, simple fix, apparently when I was putting in the fields into the pop-up xml file i didn't pay to close attention to whether those fields were in upper case or lower case letters.  I had the diameter field typed as "Diameter" when in my database it is actually "DIAMETER".  I never would have thought that mattered.  Oh well, live and learn.  Thanks for your help again, have a good weekend.
                      • Re: Pop-up Windows in Flex Viewer 2.3
                        nickdemerchant
                        Hi guys,

                        I'm also having an issue with the popup...when I followed your thread, everything seems ok in my code..

                        <operationallayers>               
                                   <layer label="Property" type="dynamic" visible="true" alpha="0.7"
                                        url="http://jdistjwnt815/ArcGIS/rest/services/iPad_Property/MapServer"/>

                                   <layer label="NBSR" type="dynamic" visible="true" alpha="0.7"
                                 url="http://irvmonwnt767/ArcGIS/rest/services/NBSR/MapServer"/>
                          <sublayer id="3" popupconfig="popups/PopUp_bridge.xml"/>
                                </operationallayers>


                        I as well, get error when having the </layer> in there.  When taking out, no prob.  My config file code is below...any suggestions?

                        <?xml version="1.0" ?>
                        <configuration>
                              <title>Bridge</title>
                              <fields>
                              <field name="Bridge" alias="Mile Marker:"/>
                              <field name="SUB" alias="Section:"  visible="true"/>
                            </fields>
                        </configuration>

                        Thanks,

                        Nick
                        • Re: Pop-up Windows in Flex Viewer 2.3
                          rscheitlin
                          Nick,

                             You are having the same issue as most that are unfamiliar with XML syntax.

                          Here is the corrected code:

                          <layer label="NBSR" type="dynamic" visible="true" alpha="0.7"
                                   url="http://irvmonwnt767/ArcGIS/rest/services/NBSR/MapServer">
                            <sublayer id="3" popupconfig="popups/PopUp_bridge.xml"/>
                          </layer>
                          • Re: Pop-up Windows in Flex Viewer 2.3
                            duclv109
                            Hi guys,

                            I'm also having an issue with the popup...when I followed your thread, everything seems ok in my code..

                            <operationallayers>               
                                       <layer label="Property" type="dynamic" visible="true" alpha="0.7"
                                            url="http://jdistjwnt815/ArcGIS/rest/services/iPad_Property/MapServer"/>

                                       <layer label="NBSR" type="dynamic" visible="true" alpha="0.7"
                                     url="http://irvmonwnt767/ArcGIS/rest/services/NBSR/MapServer"/>
                              <sublayer id="3" popupconfig="popups/PopUp_bridge.xml"/>
                                    </operationallayers>


                            I as well, get error when having the </layer> in there.  When taking out, no prob.  My config file code is below...any suggestions?

                            <?xml version="1.0" ?>
                            <configuration>
                                  <title>Bridge</title>
                                  <fields>
                                  <field name="Bridge" alias="Mile Marker:"/>
                                  <field name="SUB" alias="Section:"  visible="true"/>
                                </fields>
                            </configuration>

                            Thanks,

                            Nick


                            i am try, too, very good. thanks
                            • Re: Pop-up Windows in Flex Viewer 2.3
                              tanya.bisen
                              Hi.. I have a geoprocessing task that works fine and gives me the desired results.. I am using Infowindow renderer.. but after the buffer gets created and I get the desired results I am unable to retrieve the values in Infowindow renderer and datagrid..

                              Can anyone help me on this...
                              • Re: Pop-up Windows in Flex Viewer 2.3
                                enk
                                Sorry I have no help for the last question, but I have another one:
                                My Pop-up works fine, but I have two Polygon-Layers where the area almost even. When I pick a position where they both are, only one Pop-up appears. Is there a way to control which one appears? Or that both Pop-ups appear?

                                Thanks
                                • Re: Pop-up Windows in Flex Viewer 2.3
                                  rscheitlin
                                  C K,

                                    The issue you are describing is a known API issue and there is an active enhancement request in the system for a resolution to this.
                                  • Re: Pop-up Windows in Flex Viewer 2.3
                                    mrjermoore
                                    Is there a way to get the popup to open on mouseover for a feature layer?
                                    • Re: Pop-up Windows in Flex Viewer 2.3
                                      giboy
                                      Any idea to make popup can grab the information (attribute and attachment) from all layer (the priority is the layer on top)?

                                      so we don't need to set the url layer on script (hardcode). And if we add the new layer, the pop up automatically can grab the information.

                                      Thanks
                                      • Re: Pop-up Windows in Flex Viewer 2.3
                                        lonsharp
                                        No question this time, Robert, just another "thank you".

                                        By following you instructions here, I was able to get popups working for our site.

                                        -Lon
                                        • Re: Pop-up Windows in Flex Viewer 2.3
                                          v128620
                                          Related question, my popup works, but when I move around the map to look at other popups, the information in the popups goes blank.  I can even click on a site that had info before, but then it goes blank.  If I refresh the map, then the info comes back for another 2-3 sites and then goes away again, any ideas?
                                          • Re: Pop-up Windows in Flex Viewer 2.3
                                            khighlan
                                            Another related question - is there a way to include imagelinks in the <description>?
                                            • Re: Pop-up Windows in Flex Viewer 2.3
                                              khighlan
                                              I found the answer to my question, so I thought I would post it here.

                                              It was answered in this post: http://forums.arcgis.com/threads/30565-Image-and-Links-in-Pop-ups-Help?p=102949&viewfull=1#post102949


                                              <description>
                                                        <![CDATA[<a href='{doc_url}'><u>Link to Site Records</u></a> ]]>
                                                </description>
                                              • Re: Pop-up Windows in Flex Viewer 2.3
                                                arcgismanager_
                                                hello!
                                                could enyone help me whith my code?
                                                my popup file look like this:

                                                <?xml version="1.0" ?>
                                                <configuration>
                                                <title>{NAME}</title>
                                                <fields>
                                                <field name="NAME"/> <!-- Used in title, do not repeat in content -->
                                                <field name="TYPE" alias="Тип" visible="true"/>
                                                <field name="NAME" alias="Текс�?" visible="true"/>
                                                <field name="Ад�?ес" alias="Ад�?ес" visible="true"/>
                                                </fields>

                                                </configuration>

                                                And config.xml

                                                <configuration>
                                                <title>ArcGIS Viewer for Flex</title>
                                                <subtitle>a configurable web mapping application</subtitle>
                                                <logo>assets/images/logo.png</logo>
                                                <style>
                                                <colors>0xFFFFFF,0x333333,0x101010,0x000000,0xFFD700</colors>
                                                <alpha>0.8</alpha>
                                                </style>
                                                <!-- replace the following url with your own geometryservice -->
                                                <geometryservice url="http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer" />

                                                <!-- UI elements -->
                                                <widget left="10" top="50" config="widgets/Navigation/NavigationWidget.xml" url="widgets/Navigation/NavigationWidget.swf"/>
                                                <widget right="-2" bottom="-2" config="widgets/OverviewMap/OverviewMapWidget.xml" url="widgets/OverviewMap/OverviewMapWidget.swf"/>
                                                <widget right="20" top="55" config="widgets/MapSwitcher/MapSwitcherWidget.xml" url="widgets/MapSwitcher/MapSwitcherWidget.swf"/>
                                                <widget left="0" top="0" config="widgets/HeaderController/HeaderControllerWidget.xml" url="widgets/HeaderController/HeaderControllerWidget.swf"/>

                                                <map wraparound180="true" initialextent="-3595100 1802500 -3503400 1831200" fullextent="-20000000 -20000000 20000000 20000000" top="40">
                                                <!--<basemaps>
                                                <layer label="Streets" type="tiled" visible="true"
                                                url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
                                                <layer label="Aerial" type="tiled" visible="false"
                                                url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
                                                <layer label="Topo" type="tiled" visible="false"
                                                url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
                                                </basemaps> -->
                                                <operationallayers>
                                                <layer label="Тес�?овое п�?иложение" type="dynamic" visible="true"
                                                url="http://blackshine:8399/arcgis/rest/services/test5/MapServer">
                                                <sublayer id="3" popupconfig="popups/PopUp_house.xml"/>
                                                </layer>

                                                </operationallayers>

                                                </map>

                                                <!-- widgets organized into widget containers that manage close/open etc -->
                                                <!-- supported layout property options: horizontal(default)|float|vertical|fix-->
                                                <widgetcontainer layout="float">

                                                <widget label="Draw and Measure" left="60" top="400"
                                                icon="assets/images/i_draw2.png"
                                                config="widgets/Draw/DrawWidget.xml"
                                                url="widgets/Draw/DrawWidget.swf"/>
                                                <widget label="Print" left="390" top="400"
                                                icon="assets/images/i_print.png"
                                                config="widgets/Print/PrintWidget.xml"
                                                url="widgets/Print/PrintWidget.swf"/>

                                                <!--
                                                <widget label="My first widget"
                                                icon="assets/images/i_widget.png"
                                                config="widgets/Samples/HelloWorld/HelloWorldWidget.xml"
                                                url="widgets/Samples/HelloWorld/HelloWorldWidget.swf"/>
                                                -->
                                                </widgetcontainer>

                                                </configuration>

                                                When i started my app i can't see popup window at all.
                                                I don't know Where my mistake?