Solved! Go to Solution.
I'm having a difficult time displaying information on layers that I have in my flex viewer application. I have set up the configuration file to show the certain fields in the pop-up, but there are no corresponding information in those fields, even though I know that there are attributes to them.
Thanks!
<?xml version="1.0" ?>
<configuration>
<title>GPIN: {GPIN} </title>
<fields>
<field name="GPIN" />
<field name="NAME" visible="true" />
<field name="ST_NO" alias= "STREET NO." visible="true" />
<field name="ST_ALPHA" alias= "STREET ALPHA" visible="true" />
<field name="ST_NAME" alias= "STREET NAME" visible="true" />
<field name="ST_TYPE" alias= "STREET TYPE" visible="true" />
<field name="CITY" visible="true" />
<field name="ZIP" visible="true" />
</fields>
<showattachments>false</showattachments>
</configuration><layer label="My Layers" type="dynamic" visible="true" url="http://..../MapServer"> <sublayer id="3" popupconfig="popups/PopUp_Parcels.xml"/> </layer>
If this doesn't work, can you post a screenshot of your REST Service page for this service?
I actually figured it out. You helped point me in the right direction though, GisDEV01. Looking at the REST service, I noticed that the field names were all in lower case. I changed them to lower case and now it works.
Thanks!
<operationallayers> <layer label="Watersheds" type="dynamic" alpha="0.5" url="http://gispublic.co.lake.ca.us:6080/arcgis/rest/services/watersheds/MapServer"> <sublayer id="0" popconfig="popups/PopUp_WS.xml" /> </layer> <layer label="GeoTIFF Images" type="dynamic" alpha="0.8" visible="true" url="http://gispublic.co.lake.ca.us:6080/arcgis/rest/services/BWS_GeoTIFF/MapServer" /> <layer label="Culverts" type="dynamic" alpha="0.9" url="http://gispublic.co.lake.ca.us:6080/arcgis/rest/services/culverts/MapServer" /> <layer label="Base Layers" type="dynamic" alpha="0.8" visible="true" url="http://gispublic.co.lake.ca.us:6080/arcgis/rest/services/BWS_base/MapServer" > <sublayer id="9" popupconfig="popups/PopUp_Parcels.xml" /> </layer> </operationallayers>
<?xml version="1.0" encoding="utf-8"?> <configuration> <fields> <field name="HUNAME" visible="true" /> <field name="HANAME" visible="true" /> <field name="HSANAME" visible="true" /> <field name="SPWSNAME" visible="true" /> <field name="PWSNAME" visible="true" /> <field name="SubWS" visible="true" /> </fields> </configuration> <!-- Pop-up configuration file for: http://gispublic.co.lake.ca.us:6080/arcgis/rest/services/watersheds/Mapserver/ See pop-up documentation at http://links.esri.com/flexviewer/popups -->
<sublayer id="0" popupconfig="popups/PopUp_WS.xml" />
I am having quite a different problem with the popups in 3.1. When I try to use a dynamic service and assign popups to a sublayer the popups appear in the upper left corner of the screen (the majority of the time) or end up frozen on one particular location. The popups only work correctly on one of the sublayers when all part of a dynamic service.
In contrast, if I add each sublayer from the dynamic service, the popups will work fine. It would be quite unwieldy to add each sublayer as its own individual layer. Any thoughts on how to possibly address this issue would be appreciated.
JP