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.
The colour-scheme dropdown includes
teal-rose, a custom palette this page registers with
registerColorScheme() before rendering — pick it here, or open the toolbar's own palette
picker 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.