maplibre / maplibre-native-qt

MapLibre Qt Bindings and Qt Location Plugin
34 stars 12 forks source link

There is a lack of documentation of how to use with MapBox #102

Closed fro0m closed 5 months ago

fro0m commented 6 months ago

I tried to find the way how to use maplibre-native-qt with MapBox, but not succeed. In Qt5 there were Plugin params.

         PluginParameter {
             name: "mapboxgl.access_token"
             value: "pk.***"
         }
         PluginParameter {
             name: "mapboxgl.mapping.additional_style_urls"
             value: "mapbox://styles/fro0m/cknsonp0n0iz117pe58gu33t9"
         }

how to make MapBox to work with MapLibre?

ntadej commented 6 months ago

Mapbox is not tested with MapLibre. I recommend you try direct style URL which has access token encoded (at least that's how I used it years ago). We are open to accept documentation but from our side there is no plan to actively support and test Mapbox styles.

fro0m commented 6 months ago

@ntadej I succesfully used maptiler instead of mapbox tiles. However

SourceParameter {
                    id: radarSourceParam
                    styleId: "radar"
                    type: "image"
                    property string url: "https://maplibre.org/maplibre-gl-js/docs/assets/radar1.gif"
                    property var coordinates: [
                        [-80.425, 46.437],
                        [-71.516, 46.437],
                        [-71.516, 37.936],
                        [-80.425, 37.936]
                    ]
                }

                LayerParameter {
                    id: radarLayerParam
                    styleId: "radar-layer"
                    type: "raster"
                    property string source: "radar"

                    paint: {
                        "raster-opacity": 0.9
                    }
                }

is undocumented. At least, I could not find how it works with attached styles property.