1.5.0 • Published 12 months ago

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

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

<< 所有组件

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

位置栏

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

map.addControl(new Location({
  isCreateButtons: true,
  template: '经度:{lon} 纬度:{lat} 层级:{zoom}',
}));

Options

export type AnyEvent =
  | 'CONTROL_BUTTON_CLICK'
  | 'CREATE_BUTTONS'
  | 'CREATE_PANEL'
  | 'PANEL_CLOSE'
  | 'MAP_ON_MOVE'
  | 'MAP_OFF_MOVE'
  | 'MAP_ON_MOVE_CALLBACK';
export type Panel = {
  text?: string;
};
export type Options = {
  isShowPanel?: boolean;
  template?: string;
  isCreateButtons?: boolean;
  isCreatePanel?: boolean;
  buttons?: Utils.ButtonOptions[];
  panelContainer?: HTMLDivElement;
  panel?: {
    template: string;
    location: {
      [key: string]: string | number;
    };
  };
  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