Hi Martin,
I checked this with firebug and the div that was created is nowhere to
be seen within the firebug source. I have tried a few work arounds but
run into problems with each method.
I have tried the following code to detect when the panorama view is
closed:
google.maps.event.addListener(panorama, 'closeclick', function(){
var toggle = panorama.getVisible();
if(toggle){
newDiv();
}
});
The following function is called to redraw the div on the roadmap. The
HomeControl function contains the code for the innerHTML that I am
creating.
function newDiv(){
// Create the DIV to hold the control and call the HomeControl()
constructor
// passing in this DIV.
var homeControlDiv = document.createElement('DIV');
var homeControl = new HomeControl(homeControlDiv, map);
homeControlDiv.index = 1;
map.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(homeControlDiv);
}
The wierd thing is that when I call this code the new div is drawn on
the roadmap and I can see the previous div that was created sitting
underneath the default map controls. If I dont call this function the
previous div is not found displayed all.
It would be nice to have the new div I have created overlaying the map
however I reckon I am just going to need to create my div outside the
map area.
Cheers,
Marc