1.5.0 • Published 12 months ago

@bdh-gis/mapbox-gl-locate v1.5.0

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

<< 所有组件

🏷️ @bdh-gis/mapbox-gl-locate

定位

npm i @bdh-gis/mapbox-gl-locate
import Locate from '@bdh-gis/mapbox-gl-locate';
import '@bdh-gis/mapbox-gl-locate/src/index.css';

map.addControl(new Locate({
  lon: 126.566551,
  lat: 45.777201,
}));

Options

export type AnyEvent =
  | 'CONTROL_BUTTON_CLICK'
  | 'CREATE_BUTTONS'
  | 'CREATE_PANEL'
  | 'PANEL_CLOSE'
  | 'LON_CHANGE'
  | 'LAT_CHANGE'
  | 'SET_CURRENT_LOCATION'
  | 'LOCATE';
export type Panel = {
  header?: HTMLDivElement;
  headerTitle?: HTMLDivElement;
  headerClose?: HTMLDivElement;
  body?: HTMLDivElement;
  bodyEditRows?: {
    row: HTMLDivElement;
    rowLabel: HTMLDivElement;
    rowInput: HTMLInputElement;
  }[];
  bodyButtonsRow?: HTMLDivElement;
  bodyButtons?: HTMLDivElement[];
  lon?: string | number;
  lat?: string | number;
};
export type Options = {
  lon?: string | number;
  lat?: string | number;
  isCreateButtons?: boolean;
  isCreatePanel?: boolean;
  buttons?: Utils.ButtonOptions[];
  panelContainer?: HTMLDivElement;
  panel?: {
    header: Utils.PanelOptions;
    body: {
      editRows: Utils.EditRow[];
      buttonsRow: Utils.RowButton[];
    };
  };
  onEvents?: (event: AnyEvent, data?: any) => void;
};
1.5.0

12 months ago

1.4.0

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago

0.0.5

1 year ago