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. Googlemaps satellite view is not working

Googlemaps satellite view is not working

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 838 Views
  • 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.
  • D Offline
    D Offline
    davidesalvetti
    wrote on last edited by
    #1

    Hi,

    I'm new to QML so I'm pretty sure that there is an error in my code. I have built and installed the googlemaps plugin and now I'm working on the minimal_map example, but I can't display the satellite view. The plugin is working right because using the mapviewer example I can see the satellite view.

    here is my code:

    import QtQuick 2.0
    import QtQuick.Window 2.0
    import QtLocation 5.6
    import QtPositioning 5.6
    
    Window {
        property variant map
        width: 512
        height: 512
        visible: true
    
        Plugin {
            id: googleMaps
            name: "googlemaps" // "mapboxgl", "esri", ...
            // specify plugin parameters if necessary
            // PluginParameter {
            //     name:
            //     value:
            // }
            
        }
    
        Map {
            id: maps
            anchors.fill: parent
            activeMapType: MapType.SatelliteMapDay
            plugin: googleMaps
    
            center: QtPositioning.coordinate(59.91, 10.75) // Oslo
            zoomLevel: 14
        }
    }
    

    Can anyone give me any hint?

    Thanks in advance.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      davidesalvetti
      wrote on last edited by
      #2

      Ok, I found it myself:

         Plugin {
              id: googleMaps
              name: "googlemaps" // "mapboxgl", "esri", ...
              // specify plugin parameters if necessary
              // PluginParameter {
              //     name:
              //     value:
              // }
      
          }
      
          Map {
              id: maps
              anchors.fill: parent
              plugin: googleMaps
              activeMapType: supportedMapTypes[1]   //you should use this, instead of MapType.SatelliteMapDay
      
              center: QtPositioning.coordinate(59.91, 10.75) // Oslo
              zoomLevel: 14   
          }
      
      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