From your error message, the error is in the mapWidget.registerForEvent call (not in the callback being passed as the argument) - the MAP_EXTENTS_CHANGED event isn't registered on the 'mapWidget' object. You should inspect the object with firebug to see what it is and that might give you a hint as to why it got changed.

Mike

GordonL wrote:
Hi Mike, so since the mapWidget changes - should I capture it again anew? I get this error even if I use the following code:

mapWidget.registerForEvent(Fusion.Event.MAP_EXTENTS_CHANGED, alert("hi
there"));





Mike Adair wrote:
Just a guess but it sounds like your mapWidget object changes in between calls.

Mike

GordonL wrote:
Hi, I am just trying to grab the current scale when the user zooms in and
out
- but after the code runs once, successfully, to throws the following
error:

Message: 'this.events[...][...]' is null or not an object
Line: 110
Char: 13
Code: 0
URI: http://localhost/mapguide2010/fusion/lib/EventMgr.js

the code:

mapWidget.registerForEvent(Fusion.Event.MAP_EXTENTS_CHANGED,
alert(mapWidget.getScale()));


the code works great, once.
--
   Michael Adair
   Senior Software Architect
   DM Solutions Group Inc.

   Office: (613) 565-5056 x26
   mad...@dmsolutions.ca
   http://www.dmsolutions.ca
   http://research.dmsolutions.ca


_______________________________________________
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users




--
  Michael Adair
  Senior Software Architect
  DM Solutions Group Inc.

  Office: (613) 565-5056 x26
  mad...@dmsolutions.ca
  http://www.dmsolutions.ca
  http://research.dmsolutions.ca


_______________________________________________
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to