QtLocation Api help



  • I am trying to use the qtlocation and qtpositioning apis and I am having trouble. I have tried using the "osm" plugin and I am unable to produce a map in my UI.

    However, I registered with HERE.com and got an app id and app key for the nokia plugin. I used that with the same code and was able to produce a map but I am unable to do anything else because I am getting the following error in my application window:

    "No proxy parameter specified."

    I am not sure how to set the proxy for qt so if I can get any help with any one of the two plugins then that would be great.

    I have copied and pasted my code below:

    import QtQuick 2.4
    import QtQuick.Controls 1.3
    import QtQuick.Window 2.2
    import QtQuick.Dialogs 1.2

    import QtQuick 2.0
    import QtPositioning 5.2
    import QtLocation 5.3

    ApplicationWindow {
    title: qsTr("Work Tool Identification Enhanced Connectivity")
    width: 640
    height: 480
    visible: true

    Plugin {
        id: myPlugin
    

    // name: "osm"
    name: "nokia"
    PluginParameter { name: "app_id"; value: "" }
    PluginParameter { name: "token"; value: "
    *" }
    }

    // PlaceSearchModel {
    // id: searchModel

    // plugin: myPlugin

    // searchTerm: "Pizza"
    // //Brisbane
    // searchArea: QtPositioning.circle(QtPositioning.coordinate(35.46778, -78.02778))

    // Component.onCompleted: update()
    // }

    Map {
        id: map
        anchors.fill: parent
        plugin: myPlugin;
    

    // activeMapType: MapType.HybridMap

        center {
            latitude: 35.6580770
            longitude: -78.4218420
        }
        zoomLevel: 10
    

    // MapItemView {
    // model: searchModel
    // delegate: MapQuickItem {
    // coordinate: place.location.coordinate

    // anchorPoint.x: image.width * 0.5
    // anchorPoint.y: image.height

    // sourceItem: Image {
    // id: image
    // fillMode: Image.PreserveAspectCrop
    // source: "BHL.png"
    // }
    // }
    // }

        MapPolygon {
            color: 'green'
            path: [
                { latitude: 35.6580370, longitude: -78.4222320 },
                { latitude: 35.6577900, longitude: -78.4219760 },
                { latitude: 35.6581370, longitude: -78.4214620 },
                { latitude: 35.6583890, longitude: -78.4217180 }
            ]
        }
    }
    

    }


Log in to reply