[josm-dev] Recentering without zooming out

Maria Arias de Reyna marias at emergya.es
Wed Sep 15 11:59:51 BST 2010


El Wednesday 15 September 2010, Matthias Meißer escribió:
> Hi, well I try to implement a 'keep focused' option to my layer
> animations. I checked out remote-control plugin and it uses
>
> > Main.map.mapView.recalculateCenterScale(bbox);
>
> to set the center.
>
> But I just want to focus a single point without resizing/zooming the
> area, so i have no clue how to calc the bounding box. Is there another
> more simple way that I just don't see?
>
> regards
> Matthias


Maybe a panTo is what you are looking for?
http://dev.openlayers.org/docs/files/OpenLayers/Map-js.html#OpenLayers.Map.panTo

-- 
María Arias de Reyna Domínguez
Área de Operaciones

Emergya Consultoría 
Tfno: +34 954 51 75 77 / +34 607 43 74 27
Fax: +34 954 51 64 73 
www.emergya.es 



More information about the josm-dev mailing list