Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private MapElementCollection _mySymbols;
- public MapElementCollection MySymbols
- {
- get { return _mySymbols; }
- set { if (_mySymbols != value) { _mySymbols = value; OnPropertyChanged("MySymbols"); } }
- }
- public void mapLayer_Imported(object sender, Infragistics.Silverlight.Map.MapLayerImportEventArgs e)
- {
- if (e.Action == MapLayerImportAction.End)
- {
- for (int i = 0; i < 5; i++)
- {
- SymbolElement s = new SymbolElement()
- {
- Value = i,
- Name = "mapTracker",
- SymbolOrigin = MyMapProjection.ProjectToMap(new Point(i * 10, i * 10)),
- SymbolType = MapSymbolType.Bubble,
- SymbolSize = 10 + i * 3,
- Caption = "Element No." + i.ToString(),
- };
- MySymbols.Add(s); // Elements are in MySymbols but I cannot see them on the map
- //((MapView)View).xamMap.Layers[0].Elements.Add(s); ? this is working!
- }
- }
- }
Add Comment
Please, Sign In to add comment