setCenter doesn't work when the map is not visible
|
#1 -
28/05/2009 19:58:23
|
Reporta abuso
|
Link permanente
|
|
setCenter doesn't work when the map is not visible
|
|
|
|
|
I have a map in a tab control with the active tab not set to the map. Therefore after the page loads you have to click the map tab to view the map. The problem is that setCenter doesn't work properly or unless i have the map tab selected when setCenter method is called. If the map tab isn't selected then it is always off about 10 degrees in both directions. I have also simulated the same behavior by just making the control's style "display:hidden" and then showing it via javascript after the setCenter method is called. Here is the code on page load to center the map to the US.
gmap.reset(); gmap.setCenter(new GLatLng(45, -95), 4);
|
|
|
|
|