john.c.cartwright

problem defining a new Layer type

Discussion created by john.c.cartwright on Feb 26, 2011
Hello All,

I'm trying to define a new layer type by subclassing esri.layers.Layer, e.g.

dojo.declare('ngdc.PairedMapServiceLayer',[esri.layers.Layer],{

Problem is that when I try to fire the onLoad event, e.g. "this.onLoad(this);", I get an error:

TypeError: _4e2 is undefined
http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.1
Line 48

This happens regardless of whether I use the onLoad function inherited from esri.layers.Layer or whether I override it w/ my own definition inside the class.

Can someone please help me with this?

Thanks!

--john

Outcomes