How to use route model with mapboxgl ?



  • I already managed to create routes for osm plugin but with mapboxgl I get:
    error: Cannot route, route manager not set. from the RouteModel.
    So how can I set the route manager ?



  • Solved by using 2 plugins
    mapboxgl for Map and osm for RouteModel

    Plugin {
        name: "mapboxgl"
    
        PluginParameter {
            name: "osm.mapping.highdpi_tiles"
            value: true
        }
    
        PluginParameter {
            name: "mapboxgl.mapping.additional_style_urls"
            value: "mapbox://styles/mapbox/navigation-guidance-night-v3"
        }
    
        PluginParameter {
            name: "osm.routing.host"
            value: "http://router.project-osrm.org/route/v4/driving/"
        }
    
        PluginParameter {
            name: "osm.routing.apiversion"
            value: "v4"
        }
    }
    
    Plugin {
        name: "osm"
    }
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.