Adding Multiple PushPin to Bing Map control (XAML & C#) RRS feed

  • Question

  • How i can add  multiple push pins to bing map control. In my application, i tried to add some user control(Push pins) as children of that map control. But the issue is that when i performing zoom -in and zoom-out operation the push pin moves around the map and miss places the position.

    Here is the code i used for adding multiple push pins to the map :

       foreach (var item in PushPinCollection)
                        var pin = new CustomMapPin(Convert.ToInt32(item.BackgroundColorID)) { Name = item.ID.ToString() };
                        pin.DoubleTapped += PushpinTapped1;
                        pin.Tapped += PinTapped;
                        var loc = new Location(Convert.ToDouble(item.Latitude, System.Globalization.CultureInfo.InvariantCulture), Convert.ToDouble(item.Longitude, System.Globalization.CultureInfo.InvariantCulture));
                        pin.SetValue(MapLayer.PositionProperty, loc);


    • Moved by Min Zhu Tuesday, October 9, 2012 5:25 AM (From:Building Windows Store apps with C# or VB )
    Monday, September 17, 2012 11:42 AM

All replies

  • This question would be better asked on the Live SDK forums.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Monday, September 17, 2012 1:51 PM