I have a map that I'm initializing off-screen and sliding in using jQuery. For some reason zooming in with the scroll wheel or by double-clicking causes the map to simultaneously pan down (or pan up when zooming out). Using the slider controls works fine. Also if I disable the animation and create it on-screen it zooms normally. I'm guessing it has something to do with the relative position of the map to where it was created, but I don't imagine I have much control over that. Does anyone have any thoughts on this?
Here's how I'm styling the map:
#map {
bottom: -450px;
height: 450px;
position: fixed;
width: 100%;
}
And this is my animation function:
toggleMap: function() {
// New bottom value
var newBottom;
if (isShowing) {
newBottom = -450px;
}
else {
newBottom = 0;
}
isShowing = !isShowing;
$map.animate({
bottom: newBottom
});
},