SplitMap Control#

Example#

from ipyleaflet import Map, basemaps, basemap_to_tiles, SplitMapControl

m = Map(center=(42.6824, 365.581), zoom=5)

right_layer = basemap_to_tiles(basemaps.NASAGIBS.ModisTerraTrueColorCR, "2017-11-11")
left_layer = basemap_to_tiles(basemaps.NASAGIBS.ModisAquaBands721CR, "2017-11-11")

control = SplitMapControl(left_layer=left_layer, right_layer=right_layer)
m.add_control(control)

m

Attributes#

class ipyleaflet.leaflet.SplitMapControl(**kwargs)[source]#

SplitMapControl class, with Control as parent class.

A control which allows comparing layers by splitting the map in two.

left_layer#

The left layer(s) for comparison.

Type

Layer or list of Layers

right_layer#

The right layer(s) for comparison.

Type

Layer or list of Layers