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:
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
@poetaster: Our Qt/QML is so old that it is too painful to develop maps with it. Unfortunately, as I didn’t use the included Qt/QML framework, I cannot comment much on it.
Thanks anyway! I have some ideas but as you suggest, it’s a pain to try to locate what can be done from the current state. Still, the WebView approach sucks
Hi. I have no experience with Qt map api either. OSM Scout is using own QML components for maps and its overlays… I am aware that Jolla allowed new apis in Harbour recently, but dont look what exactly is possible now. Sorry
OSM Scout allows to add custom objects (POIs, waypoints, gpx tracks, navigation routes) to its standard map rendering pipeline. As overlay there may simple primitives or WMTS (raster tiles), like hillshading.
So, for weather overlay (in form of raster tiles), you can use libosmscout. But the integration of this library require some work. Do you want to help with that?
As far I know, @rinigus’s Pure maps is using MapLibre GL Native component. I have no idea if it supports overlay, but I would guess that yes.
Just for reference, one CAN use rainradars tile server with oms: https://tilecache.rainviewer.com//v2/radar/1666357800/256/9/53/13/2/1_0.png since it’s compatible. BUT, this can’t be used in an OSM plugin context because you have timestamp frames (so the uri changes with time), so it’s going to require more work Was probably obvious.
I would also be interested in a relatively easy solution to place some shapes (geoJSON or similar) with a color shading over a base map, in best case using plain QML (which is a task pretty simple with leaflet). I would have naively classified this as an absolute basic feature.
You could use Mapbox GL QML plugin that I developed for interfacing Mapbox GL Native (MapLibre GL Native is used now). It’s the one used by Pure Maps for showing the maps and interaction. Possibilities can be looked up in the tutorial at Tutorials | Help | Mapbox - you would have to adjust to QML though. QML API is at mapbox-gl-qml/api.md at master · rinigus/mapbox-gl-qml · GitHub , demos in that repo could be outdated.
So that is true for other applications also using the plugin? That would be great, indeed! Can we import it simply?
With TMS i meant Tile Map Server. But maybe that’s also possible with your plugin. Should be something about the Map Sources. Probably I need this. I, indeed, have to investigate further!
Regarding map sources, yes, there are several. See as examples Pure Maps pure-maps/maps at master · rinigus/pure-maps · GitHub for a list and corresponding URLs. If you will start getting many hits on tile servers then you would be on the same boat as me with free requests being denied. These days, MapTiler at least shuts down the service and will not welcome you with an invoice, as MapBox would do. But then, there are several services available, some not used in Pure Maps (yet?).
Also, you could obviously then use OSM Scout Server tiles. Again, link is available in JSON file there.
Yeah, the old geoservices-osm plugin is, even if it’s newer than 5.6, broken. I just posted a bug report since there was discussion around that point last year. I hope it’s just a bug an not either license or age that’s in the way.