It has been a common practice to apply a small delay when setting the initial map type or position of overview map.
I happened to find a GEvent 'load' that is probably intended for the purpose.
Seems to work perfect.
var ovMap=new GOverviewMapControl();
map.addControl(ovMap);
var mini=map.getOverviewMap();
GEvent.addListener(mini,"load",function(){
mini.setZoom(14);
mini.setMapType(G_SATELLITE_MAP);
});
No comments:
Post a Comment