Good day I had used folium map to load in an OpenStreetMap for my project. It had worked for a few months then when I tried opening the programme again it does not display OpenStreetMap tiles. However saving the folium map as HTML file and opening that file it would display. So I am wondering what is wrong. Did the way how things displayed in PyQt5 changed? Please help. See below for relevant code: app = QtWidgets.QApplication(sys.argv) mapCanvas = QtWebEngineWidgets.QWebEngineView() loc = {'Georgetown':[6.804258931351689, -58.148124600778885]} Gmap = folium.Map(location=loc['Georgetown'],zoom_start=14, tiles='OpenStreetMap') data = io.BytesIO() Gmap.save(data, close_file=False) mapCanvas.setHtml(self.data.getvalue().decode()) mapCanvas.show() sys.exit(app.exec_()) asked 30 Apr '21, 13:59 Nicolas Step...
showing 5 of 6
show 1 more comments
|
Without some sort of error it'll be difficult for anyone to comment. all you've said so far is that "something that no-one else has access to used to work and now does not". Have you tried asking the people who are responsible for the "QtWebEngineWidgets.QWebEngineView()" that you mention?
I will contact those responsible for QWebEngineView(). No error was raised in the program it just appeared grey with the markers I had placed on the map showing and the zoom in and out controls. I had seen on reddit a similar problem occurred with unloaded tiles. https://www.reddit.com/r/openstreetmap/comments/mh0ixw/tiles_not_loading/
I was thinking that openstreetmap would have known the API call and if it had changed to know whether something needed to be added to reveal the map.
I decided to change the tiles to "Stamen Terrain" instead of OpenStreetMap and it displayed the map. So definitely the problem is with OpenStreetMap call that makes those tiles not load. So I do not know what may have caused the issue of OSM tiles not being loaded.
Any consumer of OSM tiles needs to follow https://operations.osmfoundation.org/policies/tiles/ . If yours does not, it may be blocked.
Oh thank you so much. I was probably blocked.