[Interest] QtLocation Maps and own tile server
Petric Frank
pfrank at gmx.de
Tue Aug 15 22:05:17 CEST 2023
Hello,
i've set up an own tile server according the docs from https://switch2osm.org/
serving-tiles/manually-building-a-tile-server-debian-12/
It is working well when i use leaflet tool as shown in the document above. The
URL is http://192.168.2.180/hot/
Now i took use the following qml to display the map using my tile server. But
it seems to still access the default tile server (shows "API Key Required"
water mark):
-------------- cut ----------------
import QtQuick 2.15
import QtLocation 5.15
import QtPositioning 5.15
Item {
id: item
property real latCoordinate: <lat>
property real lngCoordinate: <lng>
Plugin {
id: mapPlugin
name: "osm"
PluginParameter {
name: "osm.mapping.custom.host"
value: "http://192.168.2.180/hot/"
}
}
Map {
id: mapDisplay
objectName: "mapDisplay"
anchors.fill: parent
plugin: mapPlugin
center: QtPositioning.coordinate(latCoordinate, lngCoordinate)
zoomLevel: 16
}
}
-------------- cut ----------------
What am i missing ?
kind regards
Petric
More information about the Interest
mailing list