Guest User

Untitled

a guest
Jul 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. private MapElementCollection _mySymbols;
  2.  
  3. public MapElementCollection MySymbols
  4. {
  5. get { return _mySymbols; }
  6. set { if (_mySymbols != value) { _mySymbols = value; OnPropertyChanged("MySymbols"); } }
  7. }
  8.  
  9. public void mapLayer_Imported(object sender, Infragistics.Silverlight.Map.MapLayerImportEventArgs e)
  10. {
  11. if (e.Action == MapLayerImportAction.End)
  12. {
  13. for (int i = 0; i < 5; i++)
  14. {
  15. SymbolElement s = new SymbolElement()
  16. {
  17. Value = i,
  18. Name = "mapTracker",
  19. SymbolOrigin = MyMapProjection.ProjectToMap(new Point(i * 10, i * 10)),
  20. SymbolType = MapSymbolType.Bubble,
  21. SymbolSize = 10 + i * 3,
  22. Caption = "Element No." + i.ToString(),
  23. };
  24. MySymbols.Add(s); // Elements are in MySymbols but I cannot see them on the map
  25. //((MapView)View).xamMap.Layers[0].Elements.Add(s); ? this is working!
  26. }
  27. }
  28. }
Add Comment
Please, Sign In to add comment