Scale Control#

Example#

from ipyleaflet import Map, ScaleControl

m = Map(zoom=5, center=[51.64, -76.52])
m.add(ScaleControl(position='bottomleft'))

m

Attributes#

class ipyleaflet.leaflet.ScaleControl(**kwargs: Any)[source]#

ScaleControl class, with Control as parent class.

A control which shows the Map scale.

max_width#

Max width of the control, in pixels.

Type:

int, default 100

metric#

Whether to show metric units.

Type:

bool, default True

imperial#

Whether to show imperial units.

Type:

bool, default True