This project has moved and is read-only. For the latest updates, please go here.

GroundOverlay Icon

Nov 14, 2011 at 11:07 AM

I have a picture in jpeg format to use in GroundOverlay class like icon. This picture is in the same folder as kml file.
I wrote this:

GroudOverlay groundOverlay = new GroundOverlay();

groundOverlay.icon = pathPicture;

But this is an error. How can I solve this problem?

Excuse me for my english.

Nov 14, 2011 at 3:31 PM

The Icon member of GroundOverlay is a type of Link so you will need to set the Href property to the desired location, something along the lines of this:

string pathPicture = "picture_path";

GroundOverlay groundOverlay = new GroundOverlay();
groundOverlay.Icon = new Icon
    Href = new Uri(pathPicture, UriKind.Relative)