Ok, I actually am getting the error. What is happening is the this.map.getLayerPxFromLonLat(someLoc) call is returning null, however you are trying to access the x member as if something valid were returned. You need to check the return values of the functions before trying to use them. I'm not sure why the ext-base.js addition has any effect though.
Dan From: julia paredes <[email protected]> Date: Wed, 20 Jun 2012 00:23:22 +0000 To: Dan Ramage <[email protected]> Cc: geoext <[email protected]> Subject: RE: {SpamScore: ssss} [Users] GeoExt breaks OpenLayers Heatmap I tried Firefox, ie 9 , safari , and chrome, and I get the same result in all of them. I added a single point using the heatmap script and without adding the ext-base.js and I get the right gradients of colours, from blue to red. But as soon as I add the ext-base.js the points are shown in black > Date: Tue, 19 Jun 2012 20:09:40 -0400 > Subject: Re: {SpamScore: ssss} [Users] GeoExt breaks OpenLayers Heatmap > From: [email protected] > To: [email protected] > CC: [email protected] > > What browser are you using. It seems to work in Firefox, or at least I am > not seeing any errors. > > Dan > > > > Hi all, > > I'm using GeoExt to create a tree node structure for my layers, and I'm > > using the following heatmap script: > > http://www.websitedev.de/temp/openlayers-heatmap-layer.htmlThe heatmap > > functionality breaks in my application when I add this script > > /ext-3.4.0/adapter/ext/ext-base-debug.js", without making any other > > changes to my code. > > > > It seems that the points are displaying correctly, is just the colour that > > is not showing properly. Instead of showing the colours, everything is > > displayed in black with the correct intensity.This is the error that I'm > > getting: > > Uncaught TypeError: Cannot read property 'x' of null > > OpenLayers.js:516OpenLayers.Map.OpenLayers.Class.getPixelFromLonLatOpenLayers.js :516OpenLayers.Map.OpenLayers.Class.getLayerPxFromLonLatOpenLayers.js:519Heatmap .Layer.OpenLayers.Class.moveToHeatmap.js:252OpenLayers.Map.OpenLayers.Class.move ToOpenLayers.js:498OpenLayers.Map.OpenLayers.Class.setCenterOpenLayers.js:473Ope nLayers.Map.OpenLayers.Class.updateSizeOpenLayers.js:464(anonymous > > function) > > > > The line in the heatmap.js that is pointed in the error list does this > > var pos = this.map.getLayerPxFromLonLat(src.lonlat);var x = pos.x - rad + > > offsetX;var y = pos.y - rad + offsetY; > > > > Any idea of what is causing this problem? > > Thanks in advance, > > Julia > > > > _______________________________________________ > > Users mailing list > > [email protected] > > http://www.geoext.org/cgi-bin/mailman/listinfo/users > > > >
_______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
