# Class: DivOverlay
在一个地理范围内创建一个随缩放而缩放的div的覆盖物 注:如果是svg,则需设置为 viewBox="0 0 width height" preserveAspectRatio="xMinYMin meet", updateDivSize选项设置为true
# Table of contents
# Constructors
# Properties
# Methods
# Constructors
# constructor
+ new DivOverlay(options
: DivOverlayOptions): DivOverlay
# Parameters
Name | Type |
---|---|
options | DivOverlayOptions |
Returns: DivOverlay
# Properties
# _map
• Optional
_map: Map
# isRemoved
• isRemoved: boolean
# isShow
• isShow: boolean
# maxPitch
• maxPitch: number
# maxZoom
• maxZoom: number
# minZoom
• minZoom: number
# options
• options: DivOverlayOptions
# parentContainer
• Optional
parentContainer: HTMLElement
# Methods
# addTo
▸ addTo(map
: Map, insertId?
: string | HTMLElement): void
# Parameters
Name | Type |
---|---|
map | Map |
insertId? | string | HTMLElement |
Returns: void
# remove
▸ remove(): void
Returns: void
# setVisible
▸ setVisible(visible?
: boolean, isDisplay?
: boolean): void
设置是否显示隐藏
# Parameters
Name | Type | Description |
---|---|---|
visible? | boolean | 是否显示 |
isDisplay? | boolean | true的话,表示用style的display去控制隐藏显示,dom还在文档中。false的话,会从文档动态清空增加 |
Returns: void
# updateBounds
▸ updateBounds(bounds
: GeoBounds | [GeoPointLike, GeoPointLike, GeoPointLike, GeoPointLike]): void
# Parameters
Name | Type |
---|---|
bounds | GeoBounds | [GeoPointLike, GeoPointLike, GeoPointLike, GeoPointLike] |
Returns: void
# updateSize
▸ updateSize(width
: number, height
: number): void
# Parameters
Name | Type |
---|---|
width | number |
height | number |
Returns: void