How to add a tilt button like Surface Globe (Touchpack)

Jun 9, 2011 at 7:22 PM

Hello everyone,

I'm really enjoying the Infostrat VE Maps on my custom build multitouch table but I'd like to tilt the map. How can I accomplish this?

What I would want is the following:

When the user clicks on a button, the map should tilt +/- 45 degrees. The same way it works in the Surface Globe application, in the Surface Touchpack.

How can I do this? I already saw the MapManipulation property but I prefer it on PanZoomPivot.

 

 private void tiltmap(object sender, System.Windows.RoutedEventArgs e)
        {
        	win7TouchVEMap.
        }

 

Hope someone can help me out!

- Niels

Coordinator
Jun 10, 2011 at 5:26 AM

You could enable or disable manipulation on a Grid surrounding the map when you push the button. Then in the ManipulationDelta, update the map's Pitch property. Depending on the specific effect you want, you may also want to pan the map backward and forward as you change the pitch.

Jun 10, 2011 at 5:59 AM

I actually have this exact feature. I pulled the source code from the Surface Globe DLLs using Reflector. I pulled out the toolbar and images as well and it works just like the Surface Globe. It's been almost a year since I played with this code though so it may take me a couple of days to find it. If you would like it then I can look for it tomorrow night and post what I find.

Jun 10, 2011 at 7:35 PM

Thanks both of you for your anwers :)!


@Kdavlin: I'm new to C# coding, so if you would check your code out it would be really appreciated! Hope you can help me out!

Thanks!

- Niels

Jun 13, 2011 at 5:40 PM

Any luck with the code :)?

 

- Niels