MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / getMapInfo

Method getMapInfo

src/mapboxgl/overlay/DeckglLayer.js:134–143  ·  view source on GitHub ↗

* @function DeckglLayer.prototype.getMapInfo * @param {maplibregl.Map} map - MapLibreGL Map 对象。

()

Source from the content-addressed store, hash-verified

132 * @param {maplibregl.Map} map - MapLibreGL Map 对象。
133 */
134 getMapInfo() {
135 let center = this.map.getCenter();
136 let zoom = this.map.getZoom();
137 let maxZoom = this.map.getMaxZoom();
138 let pitch = this.map.getPitch();
139 let bearing = this.map.getBearing();
140 let longitude = center.lng;
141 let latitude = center.lat;
142 return { center, zoom, maxZoom, pitch, bearing, longitude, latitude };
143 }
144
145 /**
146 * @function DeckglLayer.prototype.render

Callers

nothing calls this directly

Calls 2

getZoomMethod · 0.45
getMaxZoomMethod · 0.45

Tested by

no test coverage detected