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

A few questions & a compliment

May 15, 2012 at 5:39 PM
Edited May 15, 2012 at 5:48 PM

First off.. Amazing library you have created. It has provided me with some amazing tools for dealing with KML/KMZ data.

I am trying to create a KML from some data I have collected from various sources. I'll post my code below.

I have one issues currently:

-I am having trouble getting an icon to show up for each placemark.


private void createKML(string dir)
            string file = dir + "\\index.kml";
            Document doc = new Document();
            Kml kml = new Kml();

            Style style = new Style();
            style.Id = "style1";
            style.Icon = new IconStyle();
            style.Icon.Icon = new IconStyle.IconLink(new Uri(""));
            style.Icon.Scale = 1.0;
            style.Icon.Hotspot.X = 20;
            style.Icon.Hotspot.Y = 10;
            //style.Icon.Hotspot.XUnits = ? 

            for(int i = 0; i < malLat.Count; i++)
                Placemark placemark = new Placemark();
                placemark.Name = malTimes[i].ToString();

                placemark.StyleUrl = new Uri("#style1", UriKind.Relative);
                Point point = new Point();
                point.Coordinate = new Vector(double.Parse(malLat[i].ToString()), double.Parse(malLong[i].ToString()));
                placemark.Geometry = point;


Please let me know if you can help.
Thanks, Kevin
May 15, 2012 at 5:50 PM

All my problems are solved! No assistance required!

May 15, 2012 at 7:07 PM

Glad you managed to fix it, though out of curiosity how did you fix the problem in case others encounter it as well?