private void AddLayer1() { this.myLayer1 = new MapElementsLayer(); this.myLayer1.MapElements = MainPage.CreateCityBuildingsCollection(); this.myLayer1.MapElementClick += (sender, args) => SelectLayer(this.myLayer1); this.myLayers.Add(this.myLayer1); }
// The elements in layer 1 receive a default style. private void AddLayer1() { this.myLayer1 = new MapElementsLayer(); this.myLayer1.MapElements = MainPage.CreateCityBuildingsCollection(); this.myLayer1.MapElementPointerEntered += (sender, args) => UpdateMapElementOnPointerEntered(args.MapElement, ToDefaultStyleEntryState); this.myLayer1.MapElementPointerExited += (sender, args) => UpdateMapElementOnPointerExited(args.MapElement, ToDefaultStyleEntryState); this.myLayer1.MapElementClick += (sender, args) => UpdateMapElementOnClick(args.MapElements[0], ToDefaultStyleEntryState); this.myLayers.Add(this.myLayer1); }