Hi!
I’m not sure if the map-viewer example is really good starting point as it already has a lot of logic just for showcasing different plugins and features. The mapviewer application is also simple Qt Quick App and not a Felgo App (the Felgo SDK is not included and not used).
For a first simple maps example with Felgo that you can build upon, please try creating a new project based on our maps template. For this, open Qt Creator, click “New Project” in the Welcome-tab and choose “Felgo Apps – Maps Application”. Then simply enter your mapbox.map_id and mapbox.access_token as the value for the Plugin { parameters: […] }.
For a first runnable example, you can also use these demo settings:
AppMap {
anchors.fill: parent
// configure plugin for displaying map here
// see http://doc.qt.io/qt-5/qtlocation-index.html#plugin-references-and-parameters
// for a documentation of possible Location Plugins
plugin: Plugin {
name: "mapbox"
// configure your own map_id and access_token here
parameters: [ PluginParameter {
name: "mapbox.map_id"
value: "mapbox.streets"
},
PluginParameter {
name: "mapbox.access_token"
value: "pk.eyJ1IjoiZ3R2cGxheSIsImEiOiJjaWZ0Y2pkM2cwMXZqdWVsenJhcGZ3ZDl5In0.6xMVtyc0CkYNYup76iMVNQ"
}]
}
// Center map to Vienna, AT
center: QtPositioning.coordinate(48.208417, 16.372472)
zoomLevel: 13
}
The mapbox.streets map_id uses the default look by mapbox. Please replace the access token with your custom one. Just for a first test you can use the token from above, but we may replace or deactivate it anytime as it is just a dummy-token for our snippets/examples.
Best,
Günther