private void statesLayer_Imported(object sender, Infragistics.Controls.Maps.MapLayerImportEventArgs e)
{
if (e.Action == MapLayerImportAction.End)
{
// Find Element using Name property
MapElement newYork = map1.Layers[0].Elements.FindElement("Name", "New York").ElementAt<MapElement>(0);
// Get Point data from Cartesian coordinates
Point nyOrigin = new Point(newYork.WorldRect.X + 350000, newYork.WorldRect.Y + 300000);
// Create Element
SymbolElement element = new SymbolElement() { SymbolOrigin = nyOrigin, Caption = "Best Pizzarias", SymbolType = MapSymbolType.None, SymbolSize = 20 };
// Assign arbitrary value so that Value Template can be used
element.Value = 1;
map1.Layers[1].Elements.Add(element);
// Make enough space in layer for the added shape
Rect worldRect = map1.Layers[1].WorldRect;
worldRect.Union(element.WorldRect);
map1.Layers[1].WorldRect = worldRect;
}
}