Fly to
Fly to a location
This source code of this example is adapted from the MapLibre GL JS example - Fly to a location.
Uncomment the following line to install leafmap if needed.
In [ ]:
Copied!
# %pip install "leafmap[maplibre]"
# %pip install "leafmap[maplibre]"
In [ ]:
Copied!
import leafmap.maplibregl as leafmap
import leafmap.maplibregl as leafmap
In [ ]:
Copied!
# import os
# os.environ["MAPTILER_KEY"] = "YOUR_API_KEY"
# import os
# os.environ["MAPTILER_KEY"] = "YOUR_API_KEY"
In [ ]:
Copied!
m = leafmap.Map(center=[-2.242467, 53.478122], zoom=9, style="streets")
m
m = leafmap.Map(center=[-2.242467, 53.478122], zoom=9, style="streets")
m
In [ ]:
Copied!
m.fly_to(lon=-73.983609, lat=40.754368, zoom=12)
m.fly_to(lon=-73.983609, lat=40.754368, zoom=12)
