Select to view content in your preferred language

WidgetManager Error #2124

6804
35
Jump to solution
01-09-2012 07:23 AM
JustinGleeson
Deactivated User
Hi,

I have deployed a ThematicQueryWidget in my application. This works well but I always get a WidgetManager Error #2124 when I open the mapping viewer (see attached). This does not seems to stop the widget from working though. Any idea what causes this?

Code in main config

<widget label="Accessibility Maps" width="300" height="500"
                preload="open"
                left="95" top="50"
                icon="AccessMap_WidgetsPopUpsETC/assets/AccessMapTMW.png"
                config="AccessMap_WidgetsPopUpsETC/ThematicQueryWidgetAccessMap.xml"
                url="AccessMap_WidgetsPopUpsETC/widgets/Thematic Query Widget/ThematicQueryWidget.swf"/>

Code in ThematicQueryWidgetAccessMap.xml

<?xml version="1.0" ?>
<configuration>
    <!-- labelref should match the label of the operational layer's label in main config. -->
    <theme labelref="Train Stations" > 
<query legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" >
       </query>
    </theme>
</configuration>

thanks

Justin
Tags (2)
0 Kudos
35 Replies
JustinGleeson
Deactivated User
Justin,

   Have you double checked the paths then? Is this the right path and is there actually a AccessMapTMW.png in that folder?

Yes, this is all correct

AccessMap_WidgetsPopUpsETC/assets/AccessMapTMW.png


What about the swf did you add the ThematicQueryWidget to your projects modules list and is it in that exact folder?


No sure what you mean about the project modules Robert. The ThematicQueryWidget.swf is in the correct folder as per the code.

Justin
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Justin,

   Are you using the compiled or uncompiled version of the Viewer?
0 Kudos
JustinGleeson
Deactivated User
Justin,

   Are you using the compiled or uncompiled version of the Viewer?


Robert,

I'm learning as I go along here. According to the 'readme' I'm using the compiled version of the ArcGIS Viewer for Flex 2.5
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Justin,

   OK,  forget the modules thin that doesn't apply to you

things that look unusual in this XML:

<widget label="Accessibility Maps" width="330" height="500"
            preload="open" left="95" top="50"
            icon="AccessMap_WidgetsPopUpsETC/assets/AccessMapTMW.png"
            config="AccessMap_WidgetsPopUpsETC/ThematicQueryWidgetAccessMap.xml"
            url="AccessMap_WidgetsPopUpsETC/widgets/ThematicQueryWidget/ThematicQueryWidget.swf" />       



  • Most of your widgets paths start with widgets and not AccessMap_WidgetsPopUpsETC/widgets

  • mostly the widgets xml configuration file is in the same folder as the actual widget swf file

  • most of the time  the icon used is in the assets/images folder

So what about trying this:

<widget label="Accessibility Maps" width="330" height="500"
             preload="open" left="95" top="50"
             icon="assets/images/AccessMapTMW.png"
             config="widgets/ThematicQueryWidget/ThematicQueryWidgetAccessMap.xml"
             url="widgets/ThematicQueryWidget/ThematicQueryWidget.swf" />       
0 Kudos
JustinGleeson
Deactivated User
Justin,

   OK,  forget the modules thin that doesn't apply to you

things that look unusual in this XML:

<widget label="Accessibility Maps" width="330" height="500"
            preload="open" left="95" top="50"
            icon="AccessMap_WidgetsPopUpsETC/assets/AccessMapTMW.png"
            config="AccessMap_WidgetsPopUpsETC/ThematicQueryWidgetAccessMap.xml"
            url="AccessMap_WidgetsPopUpsETC/widgets/ThematicQueryWidget/ThematicQueryWidget.swf" />       



  • Most of your widgets paths start with widgets and not AccessMap_WidgetsPopUpsETC/widgets

  • mostly the widgets xml configuration file is in the same folder as the actual widget swf file

  • most of the time  the icon used is in the assets/images folder

So what about trying this:

<widget label="Accessibility Maps" width="330" height="500"
             preload="open" left="95" top="50"
             icon="assets/images/AccessMapTMW.png"
             config="widgets/ThematicQueryWidget/ThematicQueryWidgetAccessMap.xml"
             url="widgets/ThematicQueryWidget/ThematicQueryWidget.swf" />       


Robert,

The problem is still there. I think the main config is correct and work properly. The issue must be to do with either the ThematicQueryWidgetAccessMap.xml or the ThematicQueryWidget.swf. I don't have access to the code that creates the .swf, so either this is not working properly or it's with the ThematicQueryWidgetAccessMap.xml. The code is below - I don't think I'm missing anything though and everything displays corretly.

<?xml version="1.0" ?>
<configuration>
    <!-- labelref should match the label of the operational layer's label in main config. -->
    <theme labelref="Gateways" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
  <theme labelref="Gateways and Hubs" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
  <theme labelref="Settlements > 50,000" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
  <theme labelref="Settlements > 20,000" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
  <theme labelref="Settlements > 10,000" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
  <theme labelref="Settlements > 5,000" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
  <theme labelref="Settlements > 1,500" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
  <theme labelref="Primary Schools" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
  <theme labelref="Secondary Schools" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
   <theme labelref="Main Internationl Airports" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
   <theme labelref="Main Airports" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
   <theme labelref="Train Stations" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
   <theme labelref="Full Emergency Hospital (24hr)" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
   <theme labelref="Partial Emergency Hospital" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
   <theme labelref="GP Surgery" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
   <theme labelref="Dentists" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
 <theme labelref="Pharmacies" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
 <theme labelref="Fire Stations" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
 <theme labelref="Garda or PSNI Stations" >  
 <query layer="1" legendurl="AccessMap_WidgetsPopUpsETC/assets/AccessMap_National.png" > 
       </query>
    </theme>
</configuration>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Justin,

   So where are your listfields? In the original ThematicQueryWidget.xml each query has listfields:

<?xml version="1.0" ?>
<configuration>
    <info>widgets/Samples/ThematicQuery/InfoColumnChartWidget.swf</info>
    <!-- labelref should match the label of the operational layer's label in main config. -->
    <theme labelref="Unemployment" >
       <query layer="4" minscale="0" maxscale="25000001" legendurl="assets/images/Legend_unemp.png" > <!-- layer 4 is a state layer -->
           <listfields>
                <field name="NAME" alias="State" />
                <field name="UNEMPRT_CY" alias="2009 Unemployment (%)" />
                <field name="UNEMPRT_08" alias="2008 Unemployment (%)" />
                <field name="RATE_UNEMP" alias="Unemployment Change (%)" />
                <field name="TOTPOP_CY" alias="2009 Total Population" />
           </listfields>
           <columnchartfields>
                <field name="UNEMPRT_08" alias="2008" />
                <field name="UNEMPRT_CY" alias="2009" />
           </columnchartfields>
       </query>


Maybe try trimming down your queries untill you get it working correctly.
0 Kudos
JustinGleeson
Deactivated User
Robert,

problem solved! The Thematic Query Widget required the following code at the start

<?xml version="1.0" ?>
<configuration>
 <info>widgets/Samples/ThematicQuery/InfoColumnChartWidget.swf</info>


I didn't think I'd need this as I was not using the listfields or columnchartfields

thanks for your help again.

Justin
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Justin,

    Glad you got it worked out. Please mark this post as answered by click on the check under this image: and promote by clicking on the upper arrow on any posts that helped you.
0 Kudos
JORGELAGOS2
Emerging Contributor
Hello,
I need to create an option for the users to click on 5 hyperlinks to open some html pages. So I created an icon named Downloader.png. When I click on it I see my five options below. Then I tried to click in the html links below but I got WidgetManager Error #2124. Do you think is possible to feed the url with an html? Thanks in advance

Jorge Lagos
GIS Specialist

        <widgetgroup label="Downloads" icon="assets/images/Downloader.png">
<widget label="Property Sketches" left="50" top="50" icon="assets/images/Downloader.png" url="http://gis.trow.com/keystone_xl_steele_city_land/property_sketches/"/>
            <widget label="Pipe Yards" left="100" top="50" icon="assets/images/Downloader.png" url="http://gis.trow.com/keystone_xl_steele_city_land/Land_PY/"/>
            <widget label="Contractor Yards" left="150" top="50" icon="assets/images/Downloader.png"  url="http://gis.trow.com/keystone_xl_steele_city_land/Land_CY/"/>
            <widget label="Contractor Camps" left="200" top="50" icon="assets/images/Downloader.png" url="http://gis.trow.com/keystone_xl_steele_city_land/Land_CC/"/>
            <widget label="Route Variations" left="250" top="50" icon="assets/images/Downloader.png"  url="http://gis.trow.com/keystone_xl_steele_city_land/Route_Variations/"/>
        </widgetgroup>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jorge,

  Nope, you can just feed it any url like that as the url that is provided is used by the widget manager to attempt to load an actual widget.

You need to look at the Link Widget I created just for what you are trying to do.

http://www.arcgis.com/home/item.html?id=5e4717fe1bb247f89b9092308e569c30
0 Kudos