For any news or updates you can find me on
http://dotnetcampania.org/blogs/codiceamano/default.aspx


or here:
http://www.mahamudra.it/




Google Earth C# Wrapper

Easy to use, easy to go!!!



First you mark up your page with a <div id="map"></div>, possibly with some width o height through css.

1) you add on the page the script http://www.google.com/jsapi
2) then you use the following straightfoward code

var ge = new GoogleEarth(true);

ge.initCallBack(true, true, true, false, false, ritornaMarkers(ge), false);
ge.failureCallBack();

ge.registerShowSun = true;
ge.registerHideSun = true;

ge.isOptions = true;



3) add your markers!!!

public List<PlaceMark> ritornaMarkers(GoogleEarth ge)
{
var mks = new List<PlaceMark>();
var mk1 = new PlaceMark(ge,
String.Empty,
string.Empty,
40.863D,
14.2767D,
null);
mks.Add(mk1);
return mks;
}

Last edited Jan 18, 2013 at 1:52 PM by mauro_ghiani, version 13