I realize this is a very old thread, but I just experienced the same problem described here and thought I'd add some info in case anyone else stumbles across it. For me, the null pointer exception in stopObservingElement was caused because I was removing the layer from the map myself before destroying it:
I didn't realize the layer.destroy() would take care of the layer's removal from the map for me. Once I removed the map.removeLayer(layer) line, everything worked fine. Cheers, jtm -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Map-Destroy-Call-generating-error-tp1828369p6726253.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
