[OpenLayers-Users] panTo Fails?
Arnie Shore
ashore3 at verizon.net
Thu Dec 1 05:30:27 EST 2011
Folks, I have the foll'g call in init():
map = new OpenLayers.Map("map_div", { panMethod:
OpenLayers.Easing.Quad.easeInOut, panDuration: 100 });
In the following click handler, I do reach the "You clicked near ... "
alert fine. But the panTo fails silently.
trigger: function(e) {
var lonlat = map.getLonLatFromViewPortPx(e.xy);
map.panTo(new OpenLayers.LonLat(lonlat.lon,
lonlat.lat));
alert("You clicked near " + osmpos(lonlat.lat) + " " +
osmpos(lonlat.lon));
}
Any help is appreciated.
More information about the Users
mailing list