Thanks Andreas. Toby
On 31 January 2012 14:15, Andreas Hocevar <[email protected]> wrote: > Hi, > > getLonLatFromLayerPx is an internal function that does not what you > want and should not be used by applications. Try getLonLatFromPixel > instead. > > Andreas. > > On Tue, Jan 31, 2012 at 3:05 PM, Tobias Reinicke <[email protected]> wrote: >> Hello all, >> >> I have spotted some curious behaviour with the move listener on the >> map object. (using OL 2.11). >> >> The code is pretty simple.. >> >> map = new OpenLayers.Map({ >> controls: [new OpenLayers.Control.Navigation() ], >> div: "map", >> eventListeners: { >> "move": updateCoord >> } >> >> }); >> >> and the updatecoord function is just this: >> function updateMap() { >> var tlPixel = new OpenLayers.Pixel(10,10); >> var tl = map.getLonLatFromLayerPx(tlPixel); >> document.getElementById('output').innerHTML = tl.toString(); >> } >> >> >> The problem I'm seeing is that the coordinates are only updated every >> time I zoom, rather than everytime I pan / drag etc... >> >> Any ideas? >> >> Thanks, >> >> Toby >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.osgeo.org/mailman/listinfo/openlayers-users > > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
