Solara Example¶
This example demonstrates how to use Solara to create a simple map.
In [ ]:
Copied!
%pip install -U anymap-ts solara
%pip install -U anymap-ts solara
In [ ]:
Copied!
import solara
from anymap_ts import MapLibreMap
class Map(MapLibreMap):
def __init__(self, **kwargs):
super().__init__(
center=[-117.592133766, 47.653004], zoom=15.3, height="700px", *kwargs
)
super().add_basemap("Esri.WorldImagery")
@solara.component
def Page():
Map().element()
Page()
import solara
from anymap_ts import MapLibreMap
class Map(MapLibreMap):
def __init__(self, **kwargs):
super().__init__(
center=[-117.592133766, 47.653004], zoom=15.3, height="700px", *kwargs
)
super().add_basemap("Esri.WorldImagery")
@solara.component
def Page():
Map().element()
Page()