Select to view content in your preferred language

Problem with Info PopUp

1178
2
12-06-2011 08:15 AM
JustinGleeson
Deactivated User
Hi,

I'm having some difficulty getting the Info Popup widget to work properly in my Flex Viewer. I want to set up a specific info popup for each mapping layer. I have it working fine for AI_DeprivationIndex but it will not work for the second layer, Sales_2BedTerrace_07. The xml for the popups is correct.

Any ideas where the problem is here? I get the following error:

http response status: 200
Fault code: Client.CouldNotDecode
Fault info: Error #1085
Fault details: null

Code below

<operationallayers>
<layer label="All-Island Deprivation Index" type="dynamic" visible="true" alpha="0.65"        url="http://na-lap-347/ArcGIS/rest/services/AI_DeprivationIndex/MapServer">                  <sublayer id="0" popupconfig="popups/PopUp_Deprivation.xml"/>
</layer>
<layer label="Sales 2-Bed Terrace 2007" type="dynamic" visible="false" alpha="0.65"     url="http://na-lap-347/ArcGIS/rest/services/Sales_2BedTerrace_07/MapServer"/>
<sublayer id="0" popupconfig="popups/PopUp_2BedSales.xml"/>
</layer>
</operationallayers>

many thanks

Justin
Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Justin,

   The issue is in your XML syntax:

Yours
<operationallayers>
    <layer label="All-Island Deprivation Index" type="dynamic" visible="true" alpha="0.65"
        url="http://na-lap-347/ArcGIS/rest/services/AI_DeprivationIndex/MapServer">
        <sublayer id="0" popupconfig="popups/PopUp_Deprivation.xml" />
    </layer>
    <layer label="Sales 2-Bed Terrace 2007" type="dynamic" visible="false" alpha="0.65"
        url="http://na-lap-347/ArcGIS/rest/services/Sales_2BedTerrace_07/MapServer" />
    <sublayer id="0" popupconfig="popups/PopUp_2BedSales.xml" />
    </layer>
</operationallayers>


The / at the end of your layer tag tell the XML that there is nothing else to follow that is a child of that layer element which is wrong.

Correct
<operationallayers>
    <layer label="All-Island Deprivation Index" type="dynamic" visible="true" alpha="0.65"
        url="http://na-lap-347/ArcGIS/rest/services/AI_DeprivationIndex/MapServer">
        <sublayer id="0" popupconfig="popups/PopUp_Deprivation.xml" />
    </layer>
    <layer label="Sales 2-Bed Terrace 2007" type="dynamic" visible="false" alpha="0.65"
        url="http://na-lap-347/ArcGIS/rest/services/Sales_2BedTerrace_07/MapServer">
        <sublayer id="0" popupconfig="popups/PopUp_2BedSales.xml" />
    </layer>
</operationallayers>
0 Kudos
JustinGleeson
Deactivated User
Robert,

Great, I see the issue now. Thanks again for solving one of my problems

Justin
0 Kudos