declare namespace BMap {
  class OverlayV3 {
    initialize(map: Map): HTMLElement
    isVisible(): boolean
    draw(): void
    show(): void
    hide(): void
    // 这些方法文档中都没写, 但确实可以调用...
    addEventListener(event: string, handler: Callback): void
    removeEventListener(event: string, handler: Callback): void
    /** @param event type名要以'on'开头 */
    dispatchEvent(event: { type: string }): void
  }
  interface Map {
    addEventListener(event: string, handler: Callback): void
    removeEventListener(event: string, handler: Callback): void
  }
  interface Autocomplete {
    addEventListener(event: string, handler: Callback): void
    removeEventListener(event: string, handler: Callback): void
  }
  interface AutocompleteResultPoi {
    city: string
  }
  interface LocalSearchOptions {
    onSearchComplete?: ((results: LocalResult[] | LocalResult) => void) | undefined;
  }
  interface LocalResultPoi {
    uid: string
  }

  interface MarkerOptions {
    icon?: BMap.Symbol | Icon
  }

  interface Marker {
    setIcon(icon: Icon | BMap.Symbol): void;
    getIcon(): Icon | BMap.Symbol;
  }

  interface Symbol {
    /** 实际的锚点, 第一次添加到地图上时会为undefined */
    anchor?: Size
    style: {
      /** 设置的锚点 */
      anchor: Size
    }
  }

  interface IconOptions {
    imageSize?: Size
  }
}
