@bdh-gis/mapbox-gl-area-navigation
v1.0.0
Published
Area navigation for mapbox controls
Downloads
67
Readme
🏷️ @bdh-gis/mapbox-gl-area-navigation
搜索
npm i @bdh-gis/mapbox-area-navigation
import AreaNavigation from '@bdh-gis/mapbox-gl-area-navigation';
import '@bdh-gis/mapbox-gl-area-navigation/src/index.css';
map.addControl(new AreaNavigation({}));
Options
export type AnyEvent =
| 'CREATE_PANEL'
| 'CREATE_BUTTONS'
| 'PANEL_OPEN'
| 'PANEL_CLOSE'
| 'SEARCH'
| 'UPDATE_RESULTS'
| 'CLICK_RESULT_BUTTON';
export type Options = {
isCreateButtons?: boolean | undefined;
isCreatePanel?: boolean | undefined;
buttons?: Utils.ButtonOptions[] | undefined;
panelContainer?: HTMLDivElement | undefined;
panel?:
| {
header: Utils.PanelOptions;
body: {
buttons: Utils.PanelButton[];
};
}
| undefined;
onEvents?: ((event: AnyEvent, data?: any) => void) | undefined;
locateOptions?: LocateOptions | undefined;
};
export type LocateOptions = {
duration?: number;
bearing?: number;
pitch?: number;
zoom?: number;
padding?: mapboxgl.PaddingOptions;
};