QML Maps with Pinch Zoom: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
(No difference)

Revision as of 16:34, 14 January 2015

English | Български

QML Map using PinchArea to zoom and MouseArea to pan

Qt Mobility’s Location plugin provides a very nice QML Map item, but currently leaves navigation up to the developer to implement. Two common navigation methods are using a swipe gesture to pan the map around and using a pinch gesture to zoom in and out.

Having not found any solid examples of how to do these two things together, I thought I would post an example of some code which implement these two features. The code uses the PinchArea [doc.qt.nokia.com] element which was introduced in Qt Quick 1.1.

I hope you find this helpful!

Categories: