diff --git a/mapa/map.py b/mapa/map.py index be154dd..bc036bc 100644 --- a/mapa/map.py +++ b/mapa/map.py @@ -1,6 +1,6 @@ from typing import List, Tuple -from ipyleaflet import DrawControl, LayersControl, Map, basemap_to_tiles, basemaps +from ipyleaflet import DrawControl, Map, ScaleControl, basemap_to_tiles, basemaps from ipywidgets import Layout CENTER = [40.5566, 23.4660] @@ -9,10 +9,8 @@ def show_map(center: List[float] = CENTER, zoom: int = ZOOM) -> Tuple[Map, DrawControl]: m = Map(center=center, zoom=zoom, scroll_wheel_zoom=True, layout=Layout(height="600px")) - m.add_layer(basemap_to_tiles(basemaps.Gaode.Satellite)) + m.add_control(ScaleControl(position="bottomleft")) m.add_layer(basemap_to_tiles(basemaps.OpenTopoMap)) - control = LayersControl(position="topright") - m.add_control(control) dc = DrawControl(rectangle={"shapeOptions": {"color": "#0000FF"}}, polyline={}, polygon={}, circlemarker={})