NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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%20Stephney's gravatar image

Nicolas Step...
11112
accept rate: 0%

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?

(30 Apr '21, 16:18) SomeoneElse ♦

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/

(30 Apr '21, 16:36) Nicolas Step...

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.

(30 Apr '21, 17:04) Nicolas Step...

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.

(30 Apr '21, 18:20) Nicolas Step...

Any consumer of OSM tiles needs to follow https://operations.osmfoundation.org/policies/tiles/ . If yours does not, it may be blocked.

(30 Apr '21, 19:01) SomeoneElse ♦

Oh thank you so much. I was probably blocked.

(30 Apr '21, 19:07) Nicolas Step...
showing 5 of 6 show 1 more comments

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×287
×78
×2
×1

question asked: 30 Apr '21, 13:59

question was seen: 1,685 times

last updated: 30 Apr '21, 19:07

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum