I'm trying to create a function which uses a for loop to incrementally zoom
in:
function zooming(oldcrds, oldzm, newcrds, newzm)
{
j = newzm - oldzm;
xinc = (newcrds[0] - oldcrds[0]) / j;
yinc = (newcrds[1] - oldcrds[1]) / j;
for (i=1;i<=j;i++)
{
newx = oldcrds[0] + i * xinc;
newy = oldcrds[0] + i * yinc;
map.panTo(new OpenLayers.LonLat(newx, newy));
map.setCenter(new OpenLayers.LonLat(newx, newy), oldzm + i);
}
}
But this doesn't work, the map goes directly to newcrds and newzm. Any idea
how to get this working? Would love to use the jQuery easing plugin for this
(and more increments if the layer allows fractionalZoom)
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Automatic-smooth-zoom-tp6563855p6564387.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