/* BMapGL(百度地图 JS API GL 版)最小类型声明。 * * 只声明 static/js 里**实际用到**的成员;其余一律靠索引签名放行, * 这样既不丢类型检查(构造函数/常用方法有签名),又不用为整个 SDK 写声明。 * * 实际用到的:Map / Marker / Polyline / Polygon / Circle / Icon / Point / Size / * ViewAnimation / ScaleControl / WalkingRoute / Overlay / Convertor * 说明:bike-clusters.js 里还用了 BMapGL.Overlay(外部脚本自己声明,不进 bundle)。 */ declare namespace BMapGL { /** 构造选项一律宽松处理。 */ type Opts = Record; class Point { constructor(lng: number, lat: number); lng: number; lat: number; equals(other: any): boolean; [key: string]: any; } class Size { constructor(width: number, height: number); width: number; height: number; [key: string]: any; } class Icon { constructor(imageUrl: string, size: Size, opts?: Size | Opts); [key: string]: any; } class Marker { constructor(point: Point, opts?: Opts); [key: string]: any; } class Polyline { constructor(points: Point[], opts?: Opts); [key: string]: any; } class Polygon { constructor(points: Point[], opts?: Opts); [key: string]: any; } class Circle { constructor(center: Point, radius: number, opts?: Opts); [key: string]: any; } class Overlay { constructor(opts?: Opts); [key: string]: any; } class ScaleControl { constructor(opts?: Opts); [key: string]: any; } /** 视野动画(朝向/缩放过渡),navigation.js 用 new BMapGL.ViewAnimation([...], {duration}) */ class ViewAnimation { constructor(opts: any, opts2?: any); [key: string]: any; } /** 步行路线规划:navigation.js 用于精算步行距离 */ class WalkingRoute { constructor(map: Map, opts?: Opts); search(start: any, end: any): void; [key: string]: any; } /** 在线坐标转换接口(本项目已改用 coordtransform.js,保留声明以免整库报错) */ class Convertor { constructor(opts?: Opts); [key: string]: any; } class Map { constructor(container: string | HTMLElement, opts?: Opts); [key: string]: any; } }