问题描述
我有一个使用osm插件的qml映射,它处于离线模式。我注意到最大缩放级别是19,我想增加它。如何使用此插件更改最大缩放级别? 有解决办法吗?
import QtQuick.Window 2.12
import QtQuick 2.0
import QtLocation 5.11
import QtPositioning 5.11
import QtQuick.Controls 2.5
import QtQuick.Controls.Styles 1.4
Window {
visible: true
width: 640
height: 480
Plugin {
id: mapPlugin
name: "osm"
PluginParameter {
name: "osm.mapping.custom.host"
value: "file:///home/mahmud/Maps/humanitarian/" // this is the directory of map tiles
}
PluginParameter {
name: "osm.mapping.providersrepository.disabled"
value: true
}
}
Map {
id: map
anchors.fill: parent
width: parent.width
height:parent.height
plugin: mapPlugin
center: QtPositioning.coordinate(32.4279,53.6880) // oslo
zoomLevel: 6
maximumZoomLevel: 30
onZoomLevelChanged: {
console.log(map.zoomLevel)
}
Component.onCompleted: {
for( var i_type in supportedMapTypes ) {
if( supportedMapTypes[i_type].name.localeCompare( "Custom URL Map" ) === 0 ) {
activeMapType = supportedMapTypes[i_type]
}
}
}
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)