pythonmapsmapboxfolium

Folium Mapbox wrong tile rendering


So I have a problem, when my zoom is 5 and 8, some parts of map have wrong tile (the "base" of my custom tile).

Wrong rendering

My code:

f = folium.Figure(width=4680, height=4750)
m = folium.Map([36, 138], maxZoom=30, minZoom=4.8, zoom_control=True, zoom_start=5,
           scrollWheelZoom=True,
           tiles=my_tile,
           attr='My tile',
           maxBounds=[[25, 50], [120, 180]],
           dragging=True).add_to(f)

Solution

  • Occasionally I was using 2 tiles styles, setting it by folium.TileLayer('...').add_to(m) and using tiles=my_tile. So it caused this styling conflict. I just deleted the wrong one styling and everything worked fine.