[SailfishDevel] QtLocation/Map does nothing ?

Osmo Salomaa otsaloma at iki.fi
Wed Oct 15 20:42:19 UTC 2014


Hi,

15.10.2014, 22:57, Kim Foder kirjoitti:
> Im the QML file I have implemented the as follows:
>
>              Map {
>                  id: map
>                  enabled: true
>                  anchors.fill: parent // parent is for test purposes
> 				     // 400 * 400 pixels
>                  center: QtPositioning.coordinate(55,10)
>                  zoomLevel: 7
>                  Plugin {
>                    id: plugin
>                    allowExperimental: true
>                    preferred: ["osm"]
>                    required.mapping: Plugin.AnyMappingFeatures
>                    required.geocoding: Plugin.AnyGeocodingFeatures
>                  }
>              }
>
> Any ideas?

You need to assign the plugin to the plugin property. And it should be 
enough to just give the name parameter. Try

Map {
     ...
     plugin: Plugin { name: "osm" }
}

Also, you might need to set the zoom level under onCompleted.

https://bugreports.qt-project.org/browse/QTBUG-40779

-- 
Osmo Salomaa <otsaloma at iki.fi>


More information about the Devel mailing list