MCPcopy
hub / github.com/antvis/L7 / getViewState

Method getViewState

packages/maps/src/amap-next/map.ts:124–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122 };
123
124 private getViewState() {
125 const { center, zoom } = getMapHighPrecisionState(this.map);
126 const option = {
127 center: center,
128 viewportWidth: this.map.getContainer()!.clientWidth,
129 viewportHeight: this.map.getContainer()!.clientHeight,
130 bearing: -this.map.getRotation(),
131 pitch: this.map.getPitch(),
132 zoom: zoom - ZOOM_OFFSET,
133 };
134
135 return option;
136 }
137
138 protected creatMapContainer(id: string | HTMLDivElement) {
139 const wrapper = super.creatMapContainer(id);

Callers 2

syncInitViewPortMethod · 0.95
BMapServiceClass · 0.95

Calls 4

getMapHighPrecisionStateFunction · 0.85
getContainerMethod · 0.65
getRotationMethod · 0.65
getPitchMethod · 0.65

Tested by

no test coverage detected