Pinch Zoom Rotation on the Mobile UI

When ThinkGeo 13.1 was released back in July, we briefly mentioned the new Pinch Zoom Rotation features added to our Mobile UI. In today’s blog post we’ll go into more detail on this new feature and how to use it in your Mobile applications.

If you want to see the Pinch Zoom and Panning in action, you can download our ‘HowDoI’ samples from gitlab and run them in the emulator - just hold down the <ctrl> key as you drag your mouse to simulate a pinch. If you want to test this functionality on a physical device, you can install the app directly from the App Store or Play Store using the links at the bottom of this article.

By default, the map does not have this new feature enabled. To enable it, just use the RotationEnabled property on your MapView. And optionally, if you would like for the map to be initialized to a pre-rotated angle, you can set the MapRotation property to any value between -360 and 360.

The code below will enable the pinch zoom rotation and also set the starting rotation to be rotated 30 degrees counter-clockwise:

  
// Enable the pinch zoom rotation
mapView.RotationEnabled = true;

// Set the map to be rotated 30 degrees counter-clockwise when initialized.
// Note: you can use a positive number to rotate clockwise.
mapView.MapRotation = -30;
  

If you have a topic you would like to learn more about, please email sales@thinkgeo.com and we will cover it in a future post.

Get it on Google Play    Download on the App Store
Previous
Previous

ThinkGeo Basics: Debugging Tips

Next
Next

ThinkGeo Basics: Layers and Overlays