mirror of https://gitee.com/antv-l7/antv-l7
chore: 透出组件类型定义 (#1156)
This commit is contained in:
parent
4a86642405
commit
8ee39b63c3
|
@ -238,7 +238,7 @@
|
|||
/* general toolbar styles */
|
||||
|
||||
.l7-bar {
|
||||
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65);
|
||||
box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
|
||||
border-radius: 4px;
|
||||
}
|
||||
.l7-bar a,
|
||||
|
|
|
@ -1,14 +1,27 @@
|
|||
import Control from './control/BaseControl';
|
||||
import Layers from './control/layer';
|
||||
import Layers, { ILayerControlOption } from './control/layer';
|
||||
import Logo from './control/logo';
|
||||
import Scale from './control/scale';
|
||||
import Zoom from './control/zoom';
|
||||
import Scale, { IScaleControlOption } from './control/scale';
|
||||
import Zoom, { IZoomControlOption } from './control/zoom';
|
||||
import Marker from './marker';
|
||||
import MarkerLayer from './markerlayer';
|
||||
import MarkerLayer, { IMarkerLayerOption } from './markerlayer';
|
||||
import Popup from './popup';
|
||||
|
||||
// 引入样式
|
||||
// TODO: 使用 Less 或者 Sass,每个组件单独引用自身样式
|
||||
import './css/l7.css';
|
||||
|
||||
export { Control, Logo, Scale, Zoom, Layers, Marker, Popup, MarkerLayer };
|
||||
export {
|
||||
Control,
|
||||
Logo,
|
||||
Scale,
|
||||
IScaleControlOption,
|
||||
Zoom,
|
||||
IZoomControlOption,
|
||||
Layers,
|
||||
ILayerControlOption,
|
||||
Marker,
|
||||
Popup,
|
||||
MarkerLayer,
|
||||
IMarkerLayerOption,
|
||||
};
|
||||
|
|
|
@ -14,8 +14,9 @@ import { merge } from 'lodash';
|
|||
// tslint:disable-next-line:no-submodule-imports
|
||||
import Supercluster from 'supercluster/dist/supercluster';
|
||||
import Marker from './marker';
|
||||
|
||||
type CallBack = (...args: any[]) => any;
|
||||
interface IMarkerStyleOption {
|
||||
export interface IMarkerStyleOption {
|
||||
element?: CallBack;
|
||||
style: { [key: string]: any } | CallBack;
|
||||
className: string;
|
||||
|
@ -27,7 +28,7 @@ interface IMarkerStyleOption {
|
|||
zoom: number;
|
||||
}
|
||||
|
||||
interface IMarkerLayerOption {
|
||||
export interface IMarkerLayerOption {
|
||||
cluster: boolean;
|
||||
clusterOption: Partial<IMarkerStyleOption>;
|
||||
}
|
||||
|
@ -39,6 +40,7 @@ interface IPointFeature {
|
|||
};
|
||||
properties: any;
|
||||
}
|
||||
|
||||
export default class MarkerLayer extends EventEmitter {
|
||||
private markers: IMarker[] = [];
|
||||
private markerLayerOption: IMarkerLayerOption;
|
||||
|
|
Loading…
Reference in New Issue