I am using Bing.Maps in Store app

this how it is getting overlapped. Puspin overlapping

I want the pin should look like this whenever I select the specific pushpin. Map apps example

  • I have used 2 different style for pushpins
  • on Tapped event I am changing the style of the selected pushpin like this (Maps store app)

    Pushpin selectedPin = sender as Pushpin; selectedPin.Style = (Style)(Resources["SomeStyle"]);

The problem is other pushpin are getting overlapped on the selected Pin. is there any way to set the Zindex or any property of the selected pushPin? or any trick to bring the selected pushpin at top of all pins?

有帮助吗?

解决方案

For store app: add the selected pushpin to another MapLayer.

Like this: http://www.bing.com/blogs/site_blogs/b/maps/archive/2013/06/17/infoboxes-for-native-windows-store-apps.aspx

For WP8 app: Remove the selected pin and it again : ZIndex of pushpins in WP7 bing map control

其他提示

Instead of changing the pushpin style we can add another push pin on the particular push pin tap event with the same location as the parent pushpin. we can change the position origin of new push pin like this

   pushpin.Tap += (s, eve) =>
      {
        MapView.SetView(pushpin.Location,MapView.ZoomLevel);
        var pushpinModel = (s as Pushpin).DataContext;
        GeoCoordinate pinLocation = new GeoCoordinate();
        pinLocation = pushpin.Location;
        pin.PositionOrigin = new PositionOrigin(-0.3,0.7);
        pin.Location = pinLocation;
        MapView.Children.Add(pin);
      }
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top