C++ backend for the jupyter-leaflet map visualization library

Split Map Control


In [1]:
#include "xleaflet/xmap.hpp"
#include "xleaflet/xbasemaps.hpp"
#include "xleaflet/xsplit_map_control.hpp"

In [2]:
auto map = xlf::map_generator()
    .center({42.6824, 365.581})
    .zoom(5)
    .finalize();

map


Out[2]:

In [3]:
auto right_layer = xlf::basemap({"NASAGIBS", "ModisTerraTrueColorCR"}, "2017-11-11");
auto left_layer = xlf::basemap({"NASAGIBS", "ModisAquaBands721CR"}, "2017-11-11");

In [4]:
auto control = xlf::split_map_control_generator()
    .left_layer(left_layer)
    .right_layer(right_layer)
    .finalize();
map.add_control(control)

In [ ]: