Description of placemark

Feb 8, 2012 at 8:42 AM


Its a noob question. I cant add a description to the placmark. Do I need to instantiate a new element of description class or  set it from placemark.description as it takes an element of DOM.description class.

Can u provide a small code snippet for this



Feb 8, 2012 at 11:40 AM

The description of any Feature (which Placemark inherits from) can contain HTML text and will be displayed in the description balloons. You are correct that to use it you need to create a new instance of the Description class, something like this should work:

Placemark placemark = new Placemark();
placemark.Name = "My Placemark";
placemark.Geometry = new Point() { Coordinate = new Vector(1, 1) };
placemark.Description = new Description() { Text = "<p>HTML Content</p>" };

Hope it helps!