OSM Plugin : Offline map view

  • I have been trying to get off line map viewing in Qt 5.9.1. I have been using OsmOffline mentioned in QtLocation: using offline map tiles with the OpenStreetMap plugin.
    Kindly help me find the right steps to follow.

  • Moderators

    not a single question in your post.
    It would be very helpful to at least describe properly where you are stuck...

    Beside that, the link you referred to also contains a complete example project. Have you tried it?!

  • Hi @raven-worx,
    Of course i tried the example project and i am not able to view the maps off line.
    I am using the following osm plugin parameter.


    This is the code i am using for displaying the map

    import QtQuick 2.7
    import QtQuick.Window 2.2
    import QtLocation 5.9
    Window {
        id: win
        objectName: "window"
        visible: true
        width: 512
        height: 512
        Map {
            id: map
            anchors.fill: parent
            activeMapType: map.supportedMapTypes[1]
            zoomLevel: 1
            plugin: Plugin {
                name: 'osm';
                PluginParameter {
                    name: 'osm.mapping.offline.directory'
                    value: ':/offline_tiles/'

    Can you please point out any mistakes i might be committing in the qml file ?

  • Moderators

    @name_qt said in OSM Plugin : Offline map view:


    and all the offline tiles are in the qrc?!
    Show your qrc file pls.

  • @raven-worx

        <qresource prefix="/">

  • I am running this project in Ubuntu 16.04. If that makes any change.

  • When i gave

    activeMapType: map.supportedMapTypes[2]

    the map started working of-line. It was a mismatch of the maptype.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.