[OpenLayers-Users] setCenter zooming problem.
Christopher Schmidt
crschmidt at metacarta.com
Wed Feb 11 10:57:58 EST 2009
On Wed, Feb 11, 2009 at 04:54:46PM +0100, bzrudi wrote:
> Hi all!
>
> I have a strange problem and one may know a simple solution. I use
> setCenter() to center and zoom the map to a given location.
> This works as expected without any problem. The problem is I can't zoom
> in before zooming out one level first.
> So in detail, open the map:
>
> - use doubleclick, mousewheel or use zoompanel to zoom in -> nothing
> - use doubleclick, mousewheel or use zoompanel to zoom out -> works!
>
> now you can zoom in without any problem.
> I don't have the problem when not using setCenter(). E.g. zooming in
> from max entent works.
>
> Any idea?
"Share your code."
My guess is that you're passing a string as the zoomlevel: "16" or some
such. run parseInt(zoomLevel) before passing it to setCenter, and see if
that helps.
However, with no code or working example, it's impossible to know if
this is right.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list