Select to view content in your preferred language

centerAndZoom Issue

1618
11
Jump to solution
11-02-2012 06:16 AM
by Anonymous User
Not applicable
when using centerAndZoom, the point is centered left-right (East-West) but shifted Down (South) from the center of screen. Has anyone else seen this? This behavior is experienced in both PC as well as mobile device.

function doTheZoom(geom) {
   map.centerAndZoom(geom,16);
}



Thanks!

RGibson
0 Kudos
11 Replies
by Anonymous User
Not applicable
Hmmm....oddly enough that did center correctly.
0 Kudos
by Anonymous User
Not applicable
So apparently the issue was with how the sample uses the resizeMap function and the CSS. The fix was to subtract the height of the header from the screen height, like so:

$('#map').css("height", (screen.height - (document.getElementById("header").height)));

RGibson
0 Kudos