Map Interaction
When new users start using our maps, we often get questions on the best way users can interact with and navigate the map. While many of the basic pan and zoom features work like any other map component, there are a few extra, hidden features that we will cover below.
To view each of these tips in a working project, simply sign up for a free evaluation and download our Gitlab samples here!
Pan Zoom Bar
On every ThinkGeo map, you’ll notice a pan/zoom bar in the upper left corner. This pan/zoom bar has a circle with 4 arrows that resembles a compass rose which can be used for panning. There is also a vertical bar with a ‘+’ and ‘-’ button that can be used for zooming in and out.
If you want to modify this bar, add your own styling, or resize and reposition, you can easily accomplish this using the PanZoomBarMapTool in the MapView’s MapTools property.
While the pan/zoom bar is a great visual tool, there are several other ‘shortcuts’ that we’ll discuss below.
Mouse Wheel and Double-Click Zooming
If your users want to quickly zoom the map without using the pan/zoom bar, they can simply use the wheel on the mouse to zoom in and out. And if you don’t have a mouse wheel, you can double-click the left mouse button to zoom in and double-click the right mouse button to zoom out.
Track Zoom
When you want to zoom in very quickly to a specific area, simply hold down on the keyboard’s <shift> key and use the mouse and left mouse button to draw a rectangle. After you finish drawing the rectangle, the map will zoom to the extent of the rectangle.
The image to the right demonstrates the use of the track zoom using the <shift> key and drawing a rectangle with the mouse.
Panning while using the TrackOverlay and EditOverlay
Another common question we receive is how a user can pan the map while they are drawing or editing shapes in the TrackOverlay and EditOverlay. There are two different methods you can use:
Simply click the 4 directional pan arrows in the pan/zoom bar when adding or editing a shape.
You can also click on the middle mouse button (or wheel) and pan the map.
With either method, the map will pan and the shape(s) you’re drawing/editing will remain in draw/edit mode.
Rotation
Most people are familiar with the standard pinch, zoom/rotate on ThinkGeo Mobile that we discussed here. But many users are surprised to learn that you can also rotate the map on Desktop Winform/WPF applications by simply holding down the <alt> key and dragging with the mouse.
This is enabled by default and you can view this feature and any of the other features mentioned in today’s blog post by downloading our HowDoI samples here.
We hope you’ve found today’s post helpful. 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.