Use
ctrl.setOptions() to drive the map programmatically, and
onViewOptionsChange to receive toolbar changes back into your app.
The external controls in the sidebar stay in sync with the toolbar — change either one and both update.
The programmatic action buttons demonstrate
resetZoom() and
highlightBin.
Both colour dropdowns include
teal-rose, which this page registers twice before
rendering — as a bin palette with
registerBinColorScheme() and as a value gradient with
registerValueColorScheme(). Pick it here, or open the toolbar's own palette menu (it lists
bin palettes in bin modes, gradients otherwise) and see it listed there too. That is the point of
registering rather than passing colours per call: a registered scheme becomes available everywhere,
with no further wiring.
Note this is the
data palette (die colours). Theming the surrounding chrome is a separate
mechanism — see the
theming demo.