windows phone 8 - Map thumbnail
-
20-12-2019 - |
Question
I'd like to display a small image from the map fixed over a given location and if the user taps the map I'd like to navigate to different page with a large map control (just like in the HERE maps app when you're looking at a place's information). So I'd like to disable every interaction with the map control (like pan, zoom, etc.) but I need know when it's tapped, so disabling the control won't work. I tried using a small map control
<maps:Map Height="100" Width="100" x:Name="Map" Tap="Map_Tap" >
but I couldn't find a way to achieve the desired result with it.
Could you suggest something for this?
Solution
This is the general approach...
Place a transparent rectangle on top of your Map control. This should cause gesture recognition to be handled by the rectangle rather than the Map.
In a tap handler for your rectangle, navigate to the next page.
<Grid>
<Rectangle Height="100" Width="100" Fill="Transparent" Tap="Map_Tap"/>
<maps:Map Height="100" Width="100" x:Name="Map" >
</Grid>
Disclaimer: I haven't tested this code yet, but I think it should work!
Hope it helps.