views:

460

answers:

3

I'm writing an application that displays data using Google Earth. In certain situations, it would be more convenient if, rather than displaying satellite images, the surface of the earth would look more like the 'regular map' on Google Maps.

Is this possible?

+3  A: 

Yes, you can use the KML language to make super overlays to place any imagery you wish over the earth.

There are plenty of free and commercial tools to do this and also plenty of maps that are already available in kml or kmz format, such as the ones from Open Street Map.

Also, the tiling is quite a simple process so it is easy to develop your own tools to do this as well.

Fraser
A: 

You can load the Earth and Map API at the same time and use whatever logic to display one of them. Upon switching between them you read out the coords and screen boundaries from the old and update the view of the new display.

I used the Google AJAX API playground and inserted some code lines from the "Map Simple" example into the "Hello Earth" example - working fine.

Using the [Edit HTML] option, in the Hello Earth demo code, insert into the init() function

var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);

replace the html body by this

<div id="map_canvas" style="width:600px;height:400px;position:absolute;top:0;left:0;visibility:hidden;"></div>
<div id="map3d" style="width: 500px; height: 380px;position:absolute;top:0;left:0;"></div>

moving the visibility attribute from one to the other switches the display - this you can achieve by a JavaScript. Note I used different div sizes just for demo purposes, normally they would be same size.

Good luck MikeD

MikeD
A: 

Here is simple way to do it. Small file to download and it will allow you to display Google Maps on Google Earth.

http://www.gelib.com/google-maps.htm

Matt