How do one change/add layers using qml and openstreetmap (osm)?



  • Question from a newb: Is it possible to change or add layers using osm map?

    My current code:

            Plugin {
                id: osmPlugin
                name: "osm"
                PluginParameter { name: "osm.useragent"; value: "My great Qt OSM application" }
                PluginParameter { name: "osm.mapping.host"; value: "http://osm.tile.server.address/" }
                PluginParameter { name: "osm.mapping.copyright"; value: "All mine" }
                PluginParameter { name: "osm.routing.host"; value: "http://osrm.server.address/viaroute" }
                PluginParameter { name: "osm.geocoding.host"; value: "http://geocoding.server.address" }
            }
            
            Map {
                id: map
                plugin: osmPlugin
                anchors.fill: parent
                zoomLevel: 14
                
                gesture.enabled : true
                center {
                    // Rudskogen racetrack
                    latitude: 59.3680
                    longitude: 11.25
                }
            }
    
    

    Produced output:
    link to image

    Would like to have the output as:
    link to image

    To me it seem like the produced and wanted output can be switched to by changing layers as seen in

    http://www.openstreetmap.org/export#map=16/59.3665/11.2606

    by switching between "MapQuest open" and "Standard" map layers.


Log in to reply
 

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