Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Switch between google maps and google earth

Using a KML file I can show Google Earth in website. Now, can anyone give me idea to implement following specification?

  • I need following buttons above the Google Earth plugin

  • a. User must be able to switch between map and earth.

  • b. User should be able to save and download the map or earth as image

So we have to use same KML file (that is used for google earth) to show google map. After that google earth or the google maps have to be saved as image.

like image 225
Shahdat Avatar asked Nov 04 '22 05:11

Shahdat


1 Answers

As per i know,same kml will not work for google maps and google earth.Becuase, Google Earth kml is some what different to Google Maps kml.In Google Earth kml we need to declare <LookAt> that is not supported by Google Maps.Please have a look into the following url for Google Earth kml:

http://code.google.com/apis/kml/documentation/kml_tut.html

and the following url explains google maps kml:

http://econym.org.uk/gmap/kml.htm

Here we have to observe one more thing like we have <coordinates> in both cases.But ,the Projection is different in both cases.If we use same lat and lon for Google Earth and Google Maps we cannot able to get the correct result.So,you can use both kml but while passing coordinates from Google maps to Google earth,need to change the lat,lon projections and vice versa.

Hope this helps you :-)

like image 105
Kiran Avatar answered Nov 09 '22 17:11

Kiran