For store app: add the selected pushpin to another MapLayer.
For WP8 app: Remove the selected pin and it again : ZIndex of pushpins in WP7 bing map control
Domanda
I am using Bing.Maps in Store app
this how it is getting overlapped.
I want the pin should look like this whenever I select the specific pushpin.
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?
Soluzione
For store app: add the selected pushpin to another MapLayer.
For WP8 app: Remove the selected pin and it again : ZIndex of pushpins in WP7 bing map control
Altri suggerimenti
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);
}