Cannot assign to non-existent property "onMapToQtPixelRatioChanged"
tpikonen opened this issue · 8 comments
I'm trying to run 3.1.1 on Debian bookworm with the kirigami flavor. The app controls do not show up and I get this error:
qml: Error: file:///usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/kirigami.2/PageRow.qml:884: Error: Error while loading page: file:///usr/share/pure-maps/qml/RootPage.qml:34 Type Map unavailable
file:///usr/share/pure-maps/qml/Map.qml:345 Cannot assign to non-existent property "onMapToQtPixelRatioChanged"
This patch seems to fix the problem, pure-maps starts and shows the map and controls:
diff --git a/qml/Map.qml b/qml/Map.qml
index 64907b0e..e80f394e 100644
--- a/qml/Map.qml
+++ b/qml/Map.qml
@@ -342,7 +342,7 @@ MapboxMap {
onHeightChanged: map.updateMargins();
- onMapToQtPixelRatioChanged: setStyleAdditions()
+// onMapToQtPixelRatioChanged: setStyleAdditions()
onMapTypeChanged: setBias()
That patch would drop corresponding functionality. I assume you run it via DEB packaging of some kind (not aware of it). If you do, what's the version of mapbox-gl-qml in your system? It should be at least 2.0.0 and would require a switch to MapLibre GL Native instead of MapBox GL Native
Thanks, I'm actually working on the Debian packaging. The mapbox-gl-qml being outdated came to my mind just after clicking the submit button, thanks for the clarification.
Excellent! Note that MapLibre GL Native has build system fixed and I expect that there are no patches needed for building it. Patches that I use for SFOS are related to old Qt (have to use CURL instead of Qt HTTP). However, the build config can be checked in SPEC at https://github.com/rinigus/pkg-maplibre-gl-native/tree/master/rpm . Hopefully this is of help.
PS: Good luck with the packaging!
Thanks, I noticed that the git head of maplibre-gl-native has renamed QMapboxGL symbols to QMapLibreGL. Are you planning to adapt mapbox-gl-qml to this?
Also, do you have any idea if the maplibre-gl-native project is going to make Qt or Linux releases?
Yes, transition to QMapLibreGL was done and I have already support for it. Just have to merge the changes and make new release for QML plugin. Will try to do this a bit later tonight or over the weekend.
In addition, there is a plan to start making Qt releases for maplibre-gl-native. Hopefully, the first one will be soon.
Good to hear. The Debian packaging of 3.1.1 is now here. The binaries seem to work fine, but the sources are far from ready, because of extensive vendoring in maplibre-gl-native. I hope the release helps in this regard.
I have merged Mapbox QML plugin changes that require API from the current head of MapLibre GL Native (switch to QMapLibreGL symbols). New release for Mapbox QML has been tagged as well (2.1.0).
As for versioning of MapLibre GL Native, see minutes from the discussion on the subject at maplibre/maplibre#82 . Feel free to open an issue in MapLibre GL Native repo regarding versioning and vendoring. It will be good if more developers/packagers would raise it - maybe they can tag the release then sooner.