Open danielhrisca opened 1 year ago
We would be very interested in any inputs on this as well
This also happens with PySide6 6.3.2 - it would be great to hear any thoughts on how to resolve this.
The map seems to be grayed out - see also below the console output:
This looks like leaflet is unable to load the map... Do you use a custom map layer/url? @MatinF
I believe @danielhrisca can probably best answer as to the layer, but to my knowledge it is not non-standard.
It is also worth noting that with below dependencies, the GPS map works without issues:
PySide6==6.2.3
shiboken6==6.2.3
However, when we (for other reasons) need to update the dependencies, the GPS no longer shows as expected, but just plots the route with a grayed out map.
PySide6==6.3.2
PySide6-Addons==6.3.2
PySide6-Essentials==6.3.2
shiboken6==6.3.2
Do you have any thoughts as to why those changes to the dependencies might cause the map to gray out? No other changes to dependencies are made between the tests.
Sounds odd - maybe one of the new packages blocks/restricts network traffic and therefore the map can't be loaded.
Could you try this with the default map layer?
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(self.map)
If you want to use local map files you could also do this in the following way:
custom_local_layer = os.path.join(os.getcwd(), "clip", "merged", "512", "latest", "{z}", "{x}", "{y}.png")
L.tileLayer(custom_local_layer.replace("\\", "/")).addTo(self._map)
You may need to look into the way paths are made on your system.
Using L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(self.map)
does not work
This seems strange - The only reason I can think of, might be that with the version bump of PySide 6, they introducded a network restriction for components. During a quick search I didn't find a thing...
The default map (osm) shows when using folium 0.12.1.post1 with PySide6 6.3.2
However, the issue persists with pyqtlet.
@psa95 What do you mean by using folium instead of pyqtlet ?
@psa95 What do you mean by using folium instead of pyqtlet ?
If you install folium with pip install folium
and use that to generate the osm map, it successfully renders it in PySide6. Folium is also based off of leaflet.
However, if we uninstall folium and use pyqtlet instead, the map shows a grayed out screen.
@danielhrisca Perhaps this could be a solution in asammdf?
Last time I checked there was no way to have a movable cursor
Has anyone had success running this in Qt6?
It appears we are unable to reference the map. JS console suggests we are trying to read 'mapObject' which is returning null.
If anyone is available to assist with troubleshooting we can arrange a teams session. Currently working on reverse engineering this but so far unsuccessful.
We have been able to get Leaflet running inside PySide6 6.4.1 using a custom wrapper; however, best to build one as a community.
Error message: javaScriptConsoleMessage: message: Uncaught TypeError: Cannot read properties of null (reading 'mapObject'), level: JavaScriptConsoleMessageLevel.ErrorMessageLevel, lineNumber: 1
Occurs:
After or during initiation of the map.
self.map = L.map(self.mapWidget)
self.map.setView([12.97, 77.59], 10)
Affected Versions (Tested PySide6 Only):
PySide6 >6.2.3
While testing PySide6.2.4 we ran into an additional error.
UNSUPPORTED (log once): POSSIBLE ISSUE: unit 0 GLD_TEXTURE_INDEX_2D is unloadable and bound to sampler type (Float) - using zero texture because texture unloadable js: Uncaught TypeError: Cannot read property 'mapObject' of null
Hi @Omega-Networks thanks for looking into this. I tried to setup a local test environment for pyside6 but ran into issues while setting it up. I'll have a look into this probably tomorrow and will check what I can see.
What did you do in your custom wrapper, what was the workaround there?
Any progress on this? Same problem with PySide6.4.2
No sadly not. I guess during the installation something with the bindings to PySide goes wrong. I never used PySide 6 on my end therefore I don't have much experience with this.
For our use case the maps stopped working starting with PySide6 6.2.4
How can I enable debug logs/prints for the JS library? At the moment there is nothing printed when the maps widget fails to display correctly, and I have the feeling that I'm missing some important debug information
PySide6 6.2.2 work fine
Thanks to @zariiii9003, I think that the fix is to set this attribute on the map widget (tested on PySide6)
from PySide6.QtWebEngineCore import QWebEngineSettings
mapWidget = MapWidget()
mapWidget.settings().setAttribute(QWebEngineSettings.WebAttribute.LocalContentCanAccessRemoteUrls, True)
I'm using pyqtlet2 to display information from automotive measurement files (MDF).
This error (https://github.com/danielhrisca/asammdf/issues/751) was raised and I don't know what could be the cause. Can you spare some time and have a look?