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

Add text on the fly

Topics: General Topics
Dec 4, 2006 at 9:32 AM

I tried to add a text on the fly in this way:

//collection is the list of points

LabelLayer m_LabelLayer = new LabelLayer("Text Layer");
m_LabelLayer.DataSource = new GeometryProvider(collection);
m_LabelLayer.LabelStringDelegate = getString;
m_LabelLayer.Style.Font = new Font("Arial", 20);
m_LabelLayer.Style.ForeColor = Color.Red;

private string getString(FeatureDataRow row)
return "aaa";

It throw exception "Attribute data is not supported by the GeometryProvider." in the function ExecuteIntersectionQuery of GeometryPrivider.

If this is wrong way, how can i alternatively
add text on the fly?

I will be very grateful for the reply.