@bdh-gis/mapbox-gl-compass
v1.5.0
Published
Compass for mapbox controls
Downloads
23
Readme
🏷️ @bdh-gis/mapbox-gl-compass
罗盘
npm i @bdh-gis/mapbox-gl-compass
import Compass from '@bdh-gis/mapbox-gl-compass';
import '@bdh-gis/mapbox-gl-compass/src/index.css';
map.addControl(new Compass({
}));
Options
export type AnyEvent =
| 'CONTROL_BUTTON_CLICK'
| 'CREATE_BUTTONS'
| 'MAP_ON_ROTATE'
| 'MAP_OFF_ROTATE'
| 'MAP_ON_ROTATE_CALLBACK';
export type Options = {
isCreateButtons?: boolean;
buttons?: Utils.ButtonOptions[];
onEvents?: (event: AnyEvent, data?: any) => void;
};