Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QtLocation Api help
Qt 6.11 is out! See what's new in the release blog

QtLocation Api help

Scheduled Pinned Locked Moved General and Desktop
qtlocationqtpositioning
1 Posts 1 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mrboybutler
    wrote on last edited by
    #1

    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 }
            ]
        }
    }
    

    }

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved