Yes, I exactly want that to happen in the browser plug-in object
thing.
Here's my complete javascript code:
function g ( itemName )
{
return document.getElementById(itemName);
}
function loadMap ( latitude , longitude )
{
if ( GBrowserIsCompatible() )
{
var map = new GMap2( g ( "map" ) );
var info = '<div class="textSmall" style="text-align: left;">' +
placeInfoStr + '</div>';
var mapOverviewControl = new GOverviewMapControl();
var point = new GLatLng ( latitude , longitude );
var infoWindowInitPoint = new GLatLng ( latitude+.0006 ,
longitude );
map.setCenter ( point , 16 );
map.addMapType ( G_SATELLITE_3D_MAP );
//map.setMapType ( G_HYBRID_MAP );
GEvent.addListener ( map , 'maptypechanged' , function()
{
if ( map.getCurrentMapType().getName() == 'Earth' )
{
//map.removeControl ( mapOverviewControl ); //Remove it, because
it screws up a lot of stuff.
}
else
{
//map.addControl ( mapOverviewControl );
}
} );
map.addControl ( new GLargeMapControl() );
map.addControl ( new GMapTypeControl() );
//map.addControl ( mapOverviewControl );
map.enableDoubleClickZoom ();
map.openInfoWindowHtml ( infoWindowInitPoint , info );
var marker = new GMarker(point);
function createMarker(point)
{
GEvent.addListener ( marker , 'click' , function()
{
marker.openInfoWindowHtml ( info );
});
return marker;
}
map.addOverlay ( createMarker ( point ) );
}
map.getEarthInstance ( initCB );
}
ge = null;
function initCB(object) {
ge = object;
ge.getWindow().setVisibility(true);
var camera = ge.createCamera('xyz');
camera = ge.getView().copyAsCamera(ge.ALTITUDE_ABSOLUTE);
camera.setAltitude(100);
camera.setRoll(45);
camera.setTilt(90);
ge.getView().setAbstractView(camera);
}
I must be screwing up something... Please note there are lines that
are commented out.
Thanks for helping, I appreciate your help! :)
kdd