Skip to main content

QtLocation reloaded

Once upon a time, back in the Qt 4 and QtMobility days, there used to be a Location API. Unfortunately, during the transition to Qt 5, this API never managed to get a complete port. Qt Mobility location code was tightly bound to QML1, while Qt 5 introduced QML 2. However if you looked carefully, you may have detected that some QML 2 work had already been done for Qt 5.0. More attention and love was required though. With Qt 5.2 Qt Positioning was released, which was a subset of the Qt 4 Location API offering. It focused on providing the means to determine the geographic position.

Now, with Qt 5.5 the remaining Location APIs are back as a Technology Preview. The main differences between the initial Qt 5.0 work and the current state are the removal of the Qt3D dependencies, updating the map rendering logic and fixing the mouse/touch handling.

The heart of every location offering is accessing and presenting map data. Qt Location builds on top of the Qt Positioning offering and uses Mercator projections for tile -maps. They are rendered using Qt Quick Scene Graph with tiles being simple texture nodes. Users can interact with maps using gestures, insert markers or draw simple geometric objects like rectangles & circles. There are currently three plug-ins providing map data:

hereHERE

osmOpenStreetMap

mapboxMapbox

In addition, Qt Location provides utilities to find a geographic coordinate based on a street address (geocoding) and navigation routes between two locations. It includes simple driving and walking directions. Everything is exposed with nice and familiar model types in QML, for example GeocodeModel and RouteModel. The obtained navigation data can be presented on the map using the Route type and follows the model-view-delegate pattern. The route instructions can be extracted via the RouteManeuver type. Currently, the HERE and OpenStreetMap plug-in provide support for geocoding and navigation.

here-navi

Last but not least, there is the Places sub module. It not only provides the means to discover categorized places of interests (POIs) but also presents place details like reviews and associated images. The Places API centers around several QML models with the main two being CategoryModel and PleaseSearchModel. Other features such as search suggestions and reviews are implemented in similar ways. Currently POI functionality is provided by the OpenStreetMap and HERE plug-in.

In summary, QtLocation is back in Qt 5.5. Please checkout our documentation and we are looking forward to your feedback !

The post QtLocation reloaded appeared first on Qt Blog.



Source :- Qt Blog http://ift.tt/1HQN6Yz

Comments

Popular posts from this blog

Integrating custom OpenGL rendering with Qt Quick via QQuickFramebufferObject

Integrating custom OpenGL rendering code, for example to show 3D models, with Qt Quick is a popular topic with Qt users. With the release of Qt 5.0 the standard approach was to use the beforeRendering and afterRendering signals to issue the custom OpenGL commands before or after the rendering of the rest of the scene, thus providing an over- or underlay type of setup. With Qt 5.2 a new, additional approach has been introduced: QQuickFramebufferObject . This allows placing and transforming the custom OpenGL rendering like any other Quick item, providing the most flexible solution at the expense of rendering via OpenGL framebuffer objects. While it was little known at the time of its original release, it is becoming more and more popular in applications built with Qt 5.4 and 5.5. It is also one of the building blocks for Qt 3D, where the Scene3D element is in fact nothing but a QQuickFramebufferObject under the hood. We will now take a look at this powerful class, look at some example...

Qt Weekly #27: WiFi networking support on embedded devices

As a part of the Qt for Device Creation offering we provide several helpful add-on modules that assist in creating applications for embedded devices. In this blog post I would like to demonstrate some of the features supported by the B2Qt WiFi add-on module. What is it? The B2Qt WiFi module provides APIs for connecting embedded devices to a wireless network. There are C++ and QML APIs available for managing wireless network connectivity, scanning for wireless network access points, retrieving information from these access points, monitoring for network state changes and more. The API allows you to manage when and to which network to connect, and when to go offline. Overview of the API The module consists of 3 classes: (Q)WifiConfiguration – Used to define a network configuration. (Q)WifiDevice – Represents a physical device. (Q)WifiManager – Main interface to the WiFi functionality (Singleton). How to use it Here is a code snippet in QML demonstrating how easy it is to connect a ...

High-DPI Support in Qt 5.6

Qt 5.6 brings improved high-DPI support, in the form of better support for the devicePixelRatio scaling mode. In this blog we’ll look at how to configure and enable it, from the perspective of a Qt application user and a Qt application developer. Unscaled sammegame vs scaled samegame Developing applications won’t be covered in depth now, but has to some extent been covered earlier . The short story is that applications generally benefit from this high-DPI mode even without modifications. This high-DPI mode is a virtualization mode, where there is not necessarily a 1:1 correspondence between a unit in the QWidget/Quick item coordinate system and a pixel on screen. One “unit” then has constant visual size across systems with different display densities, and actual screen pixel density is to a large degree hidden from the application. Dots Per Inch (DPI) is the traditional measurement for display density, where a standard density display has a DPI value of 72 or 96. Qt as always...