- From: Bjoern Hoehrmann <derhoermi@gmx.net>
- Date: Mon, 18 Jun 2012 01:41:20 +0200
- To: www-archive@w3.org
* Bjoern Hoehrmann wrote: > http://www.websitedev.de/temp/openlayers-heatmap-layer.html on load >the layer's moveTo method is called which in turns calls the method >`this.map.getLayerPxFromLonLat` which ends up querying the `left` and >`top` properties of map.layers[1].map.layerContainerDiv.style (the >Bing layer) which returns the empty string because the properties are >not in fact set. If you change the layer to the OpenLayers WMS layer >and then back to the Bing layer, the properties are set and the code >works as expected and as it used to until recently. Clearly something >that is supposed to initialize the property values doesn't (or it is >assumed that parseInt("") will return zero which it does not). I've debugged this further and it seems to be an OpenLayers regression; https://github.com/openlayers/openlayers/issues/534 has my patch for it. A workaround would be to call something like `map.moveTo(1,1);` before adding an instance of my Heatmap layer to initialize the values. I have http://github.com/hoehrmann/openlayers-heatmap noted that in the README. -- Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de 25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Received on Sunday, 17 June 2012 23:41:46 UTC