This project has moved. For the latest updates, please go here.

Description of placemark

Feb 8, 2012 at 9:42 AM

HI.

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

Thanks

Regards

Coordinator
Feb 8, 2012 at 12:40 PM

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!