Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Grab-pull panning in mapping services does not work in QtQuick 2.0 and QtWebKit 3.0
Qt 6.11 is out! See what's new in the release blog

Grab-pull panning in mapping services does not work in QtQuick 2.0 and QtWebKit 3.0

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 953 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.
  • T Offline
    T Offline
    tomg
    wrote on last edited by
    #1

    The following simple .qml when run in Qt QmlScene will display a map from Bing maps or Esri online maps, but in both cases you cannot pan using the grab-pull method that works with the same service in a browser. Google Maps doesn't seem to display anything at all. The normal web-type controls on the page, i.e. the "zoom-in" slider of each service will work. Also, using the mouse wheel to zoom in and out works. The up, down, left and right, cursor keys will pan the map. It seems that the mouse button messages are not being passed through to the web page. This web page business is pretty much of a mystery to me, so I don't have much of an idea what is going on.

    I've also tried the same urls using QtQuick 1.0 and QtWebKit 1.0 in Qt Qmlviewer. The results are pretty much the same except for the circle control with the "N" in it at the top-right of Bing Maps. In WebKit 3.0 clicking on one of the direction arrows in the control will "pan" the map a few pixels, but holding the left mouse button down has no effect. In WebKit 1.0 holding the left mouse button down pans the map continuously.

    Thanks for any help or suggestions.

    @
    import QtQuick 2.0
    import QtWebKit 3.0

    Rectangle {
    id: root
    width: 1800
    height: 900

    WebView {
        id: mapView
        anchors.fill: parent
        url: "http://bing.com/maps"
    

    // url: "https://maps.google.com/"
    // url: "http://services.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer?f=jsapi"
    }
    }
    @

    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