Skip to content

Commit

Permalink
ENH: add scale and remove unused layer from ipyleaflet map
Browse files Browse the repository at this point in the history
  • Loading branch information
fgebhart committed Feb 18, 2022
1 parent 414c8f4 commit fc0575e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mapa/map.py
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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={})

Expand Down

0 comments on commit fc0575e

Please sign in to comment.