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. Qt location MapboxGL qml Plugin+ OpenWeatherMap map Tiles
Forum Update on Tuesday, May 27th 2025

Qt location MapboxGL qml Plugin+ OpenWeatherMap map Tiles

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 1.4k 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.
  • P Offline
    P Offline
    Pilot.Rockstar
    wrote on 4 May 2018, 16:51 last edited by SGaist 5 Apr 2018, 20:42
    #1

    hello everyone, i'm using Qt MapboxGL maps with QML to deploy my application. I wanted to add OpenWeatherMaps temperature map layer to my original one using that guide OpenWeatherMap layers Api. but the problem is that i cant load it into my QML. i used Maputnik editor to edit my json file then add it as a mapbox style. the result was great in the editor, but not on my application. can anyone help me to resolve this problem please. 0_1525452369739_Screenshot_2018-05-03_12-31-441.png
    Here is my Code```

        Map {id: map
        anchors.fill: parent
        zoomLevel: 3
        minimumZoomLevel: 2
        maximumZoomLevel:30
        tilt: tiltValue
        
        plugin: Plugin {
            id: mapboxglPlugin
            name: "mapboxgl"
            
            PluginParameter { name: "mapboxgl.access_token"; value: "ACCESS_TOKEN_VALUE" }
            //        PluginParameter { name: "mapbox.map_id"; value: "styles/bayou020/cj9v21si54gk52st7ivz9ywui" }
            PluginParameter { name: "mapboxgl.mapping.additional_style_urls"; value: "mapbox://styles/bayou020/cj9v21si54gk52st7ivz9ywui" }
            
            PluginParameter {
                name: "mapboxgl.mapping.items.insert_before"
                value: "aerialway"
            }
            
            
        }
        
        
    
    
                MapParameter {
                    id: source
                    type: "source"
        
                    property var name: "weatherSource"
                    property var tiles: "https://tile.openweathermap.org/map/clouds_new/{z}/{x}/{y}.png?appid=APP_ID"
                    property var sourceType: "raster"
                    property var tileSize: 256
                    property var scheme: "xyz"
                    property var minzoom: 4.0
                    property var maxzoom: 20.0
    
                }
        
        
                MapParameter {
                    type: "layer"
        
                    property var name: "wind_weather"
                    property var layerType: "raster"
                    property var source: "weatherSource"
    
                          }}
    

    ,,,
    and my modified Json file

     
     "sources": {
        "composite": {
          "url": "mapbox://mapbox.mapbox-terrain-v2,mapbox.mapbox-streets-v7",
          "type": "vector"
        },
        "weather": {
          "type": "raster",
          "tiles": [
            "https://tile.openweathermap.org/map/temp_new/{z}/{x}/{y}.png?appid=APP_ID"
          ],
          "minzoom":2,
          "maxzoom": 20,
    "tileSize": 256
        }
      },
      "sprite": "mapbox://sprites/bayou020/cjgpxncmv00012spcjdwidvxy",
      "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf",
      "layers": [
            {
          "id": "clouds",
          "type": "raster",
          "source": "weather"
    
        }
      ],
    

    [edit: Removed sensitive information SGaist]

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Pablo J. Rogina
      wrote on 4 May 2018, 20:38 last edited by
      #2

      @Pilot-Rockstar just in case, you may want to avoid posting "valid" API keys so widely...

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      1
      • P Offline
        P Offline
        Pilot.Rockstar
        wrote on 4 May 2018, 20:43 last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0

        1/3

        4 May 2018, 16:51

        • Login

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