Skip to content

gi-nx


gi-nx / enableMapCamera

ts
function enableMapCamera(): void;

if called, the map camera will be dispatched to the SDK app on every map move and can be accessed via the state key mapCamera. Off until called.

Each update carries the same value getMapCamera returns, debounced to the trailing edge of the move. An app that only needs the camera at the moment it draws can skip this and call getMapCamera instead, which is exempt from call throttling.

Returns ​

void

See ​

getMapCamera to read the camera on demand rather than subscribe.