1

The whole map has a TileLayer = 'OpenStreetMap'. How to change the Title Layer only for the area indicated by the polygon?

import folium

X1 = 61.70029083832628
Y1 = 27.24609375
X2 = 61.68987220046
Y2 = 27.26806640625

mapObj = folium.Map(location=[X1, Y1], tiles="OpenStreetMap", zoom_start=14)

folium.Polygon(
    [(X1, Y1), (X2, Y1), (X2, Y2), (X1, Y2)],
    color='red',
    weight=4
).add_to(mapObj)

mapObj

Сurrently

For example, so that the polygon has TileLayer = 'Stamen Watercolor'

Result

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.