I have very simple code that works fine on my laptop running Chrome, but not on my Android browser (Gingerbread 2.3.6):
window.addEventListener("resize", handleResize, false);
function handleResize() {
if( map != null ) {
map.setCenter(myLoc);
var w1 = $(mapDiv).width();
alert(w1 + " " + myLoc);
}
}
As you can see, all I'm doing is trying to reposition after a resize event. Any idea why this is not working on my phone? (And, yes, the phone knows that it has been changed.)
source
share