[OpenLayers-Users] panTo() outside of the extents

Eric Lemoine eric.c2c at gmail.com
Fri Jun 6 01:58:20 EDT 2008


On Thu, Jun 5, 2008 at 7:38 PM, aschwartz <aschwartz at solidworks.com> wrote:
>
> Hello all,

Hello

>
> In the map.panTo Example, it says "If the new random center is in the
> current extent, the map will pan smoothly. "
>
> Is there a way to change it so that panTo will pan smoothly no matter what?

No. You'd need to look at the panTo code and implement your own panTo method.

<http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Map.js#L1368>

> Also is the extent referring to the bounds of your current view of the map,
> or is it referring to the actual extent set in code with Openlayers.bounds?

The former.

--
Eric



More information about the Users mailing list