Select to view content in your preferred language

Legend problems Version 2.2 Viewer

2295
5
01-05-2011 06:54 AM
RaymondBlack
Emerging Contributor
Hi,

I have built the version 2.2 viewer from the source code and am using it with a version 10 (SP1) ArcGIS server and a dynamic map service published from ArcMAP version 10 (Build 2800).  When I use the legend widget that comes with the version 2.2 widget I get the following error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.esri.ags.skins::LegendSkin/findLeafLayerLegendInfo()
at com.esri.ags.skins::LegendSkin/findLeafLayerLegendInfo()
at com.esri.ags.skins::LegendSkin/findLeafLayerLegendInfo()
at com.esri.ags.skins::LegendSkin/extentChangeHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at com.esri.ags::Map/tweenEndHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at MoveResize/enterFrameHandler()

The error occurs as soon as the widget loads (if I preload it), and after any change to the map that affects the layer visibility subsequently (Zoom, toggle layer from TOC, etc). 

Any ideas?

Regards,

++ Ray
Tags (2)
0 Kudos
5 Replies
MehulChoksey
Esri Contributor
could you check using firebug/fiddler to see if  correct requests/responses are being sent/received?
0 Kudos
JeffLegato
Regular Contributor
I don't get that issue but I do get a couple of others. 

1.  It seems that only items that are loaded as "feature" type appear in the legend.  I realize that this issue may be because my application is internal and behind a firewall but it would be nice to confirm so I can take steps to get it working on my end. 

2. Also, there is a large space between items in the legend when I check on the top layer and the bottom layer.  It's as if there is line added to the top of each layer as they are shown in the legend and that line multiplies depending on how many layers you have loaded in your viewer.

(Don't seem to have any luck inserting this image)

Try this link to see what I am talking about...

http://picasaweb.google.com/lh/photo/yL3Nlkg4RVLjKxJd3HVsyg?feat=directlink
0 Kudos
giuseppemolinario
Deactivated User
I get the same problem:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at MethodInfo-989()
at com.esri.ags.skins::LegendSkin/commitProperties()
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/validateProperties()
at mx.managers::LayoutManager/doPhasedInstantiation()
at mx.managers::LayoutManager/doPhasedInstantiationCallback()

This error makes flash crash.

I am not sure how this happpened - the map used to display correctly - it seems like this problem started after I removed a layer from my operational layers...but everything was working fine before i even added that layer in the first place.

Does anyone know more about this issue?

I will try firebug again but it seems to be saying there are no errors?

Thanks

Giuseppe
0 Kudos
Ganael_Jatteau
Emerging Contributor
Same here:
TypeError: Error #1009: Il est impossible d'accéder à la propriété ou à la méthode d'une référence d'objet nul.
at com.esri.ags.skins::LegendSkin/commitProperties()
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/validateProperties()
at mx.managers::LayoutManager/doPhasedInstantiation()
at mx.managers::LayoutManager/doPhasedInstantiationCallback()


And when using firebug, all legend elements are queried correctly.
0 Kudos
KenMatthews
Deactivated User
Has anyone found a resolution to this problem?  I am using the esri:Legend component, and am getting the same error when trying to set the map or layers property in code.

Thanks,
Ken
0 Kudos