[OpenLayers-Dev] null pointer exception

Dombi József Dániel dombijd at inf.u-szeged.hu
Mon Mar 21 05:12:29 EDT 2011


Hi,

 

I am creating a web application that uses openlayers (2.10). In my
application I have three component, that is separeted in 3 different layers:
object, point, line. I have to handle the following events:

-    object: 

a, popup, when mouse is over

b, select, when clicked

c, multiselect: when ctrl+ box selection

-    point:

a, popup, when mouse is over

-    line:

no event handling

 

I have created three selectfeatures for this. One for multiselect and two
for the rest. Because I need the collection of point in object multiselect I
subscribe for document, selectfeature and map event.

 

Sometimes, in Visual Studio, I have got nullpointer exception when I close
the web application. The exception occures in the following class:

OpenLayers.Handler.Box=OpenLayer.Class{...} in the following method: 

deactivate:function(){if(OpenLayers.Handler.prototype.deactivate.apply(this,
arguments)){this.dragHandler.deactivate();return true;}else{return false;}}

 

The dragHandler is null, so it is not possible to call the deactivate method
(if i am right I haven't got this exception in version 2.8). Is it a bug or
am I use something wrong?

 

The example can be found in here:

http://www.inf.u-szeged.hu/~dombijd/openlayers/realdemo.html

http://www.inf.u-szeged.hu/~dombijd/openlayers/Scripts/realdemo.js

 

Best regards:

 

Jozsef Daniel Dombi

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20110321/5e50bb36/attachment.html


More information about the Dev mailing list