Since we have a number of QT/QML mapping experts here I thought I’d ask here. I’ve done primitive navigation (the QT location examples are pretty good) testing in QML and wanted to implement a simple map overlay. But I’m not sure where to begin when creating overlay layers. It’s pretty simple in javascript in conjunction with the leaflet library, and I think there are probably 12 different solutions.
As I understand it, I make a base Map item and then add plugin type items overlay for a second Map item. But, looking at the api I’m using, I thought maybe I’m looking in the wrong direction. I’m bascially doing:
(where L.TileLayer is a call to leaflet)
var source = new L.TileLayer(apiData.host + frame.path + '/' + optionTileSize + '/{z}/{x}/{y}/' + colorScheme + '/' + smooth + '_' + snow + '.png', {
tileSize: 256,
opacity: 0.01,
zIndex: frame.time
});
This get’s me the overlay rain radar images which are just swapped out one frame.time at a time given z/x/y as from the ‘base layer’ (which is osm). This is obviously a tile service
I don’t think MapItemView is the right approach, but… maybe @rinigus or @karry have an idea where I should start (and yeah, I’m looking at your code
EDIT: my code is mostly just : rainviewer-api-example/rainviewer-api-example.html at master · rainviewer/rainviewer-api-example · GitHub
Simple …
https://api.rainviewer.com/public/weather-maps.json