Show a map with controls
MapView draws the map. MapControls is the floating stack over it, and each built-in control is a flag you switch on. The Props tab lists every component and prop.
MapView fills its container, so give the container a height. Packages and the stylesheet are on Install.
A map's own requests reject no call of yours. Pass onAccessRequired and onError to hear about them:
Each built-in control is a flag, off by default. Children join the same stack, spacing and focus order.
Leave openPanel unset and the stack opens its own panels. Set it to control them yourself.
CompassRose is the needle CompassControl draws, for a compass of your own. StudioControls belongs to the studio chrome.
Put SearchControl in the stack's children. It takes the stack's corner and searches through the map's client, which needs a session token.
StreetViewControl is a handle the reader drags onto the map. The imagery is Google's, so it needs your Google Maps API key and the @googlemaps/js-api-loader package.
Three panels open from the stack. Each takes its options through a prop named after it.
Mount a panel on its own when it belongs in a sidebar or a settings drawer.
Left unset, a control drives the map itself. Set an on* handler and yours runs instead:
DownloadControl and DirectionsControl require their onClick, because only your app knows what to open:
Five primitives make a control indistinguishable from the built-ins: ControlButton, ControlGroup, ControlTooltip, Glyph and OptionRow.
Icons, strings and colours come from the provider: see Customize the elements. The camera and provider hooks a control reads are on Hooks.