6

I am trying to have a zoomable satellite map for my Transportation network analysis. Other free maps all OK but could not get satellite to work. I am using:

token = 'pk.eyJ1IjoiYXNhZGkxOTc4IiwiYSI6ImNqanphbHVhMDA4ODgzd25yYzY1MW1nc2oifQ.dDDcWq2-tUC-XXXXXXX'
tiletxt = 'https://api.mapbox.com/v4/mapbox.satellite/3/2/3@2x.png?access_token=' + str(token)

my_map = folium.Map(location = [lat,lon], tiles = tiletxt, attr='WHAT SHOULD I PUT HERE?', zoom_start = 7)

But give a grid static map which cannot be zoomed etc.

Can I get some instructions how I can get a nice satellite map?

2 Answers 2

7

You can also use ESRI Satellite for satellite images. I used this:

tile = folium.TileLayer(
        tiles = 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
        attr = 'Esri',
        name = 'Esri Satellite',
        overlay = False,
        control = True
       ).add_to(map_1)
4

Your code is almost correct. Fixed one:

token = "pk...." # your mapbox token
tileurl = 'https://api.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}@2x.png?access_token=' + str(token)

m = folium.Map(
    location=[48.73596, 11.18434], zoom_start=9, tiles=tileurl, attr='Mapbox')
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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.