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

Method setBearing

src/common/mapping/WebMapBase.js:234–241  ·  view source on GitHub ↗

* @function WebMapBase.prototype.setBearing * @description 更新地图旋转角度。 * @param {number} pitch - 地图旋转角度。

(bearing)

Source from the content-addressed store, hash-verified

232 * @param {number} pitch - 地图旋转角度。
233 */
234 setBearing(bearing) {
235 if (this.map) {
236 this.mapOptions.bearing = bearing;
237 if (bearing !== +this.map.getBearing().toFixed(2)) {
238 (bearing || bearing === 0) && this.map.setBearing(bearing);
239 }
240 }
241 }
242
243 /**
244 * @function WebMapBase.prototype.setPitch

Callers 4

setMapOptionsMethod · 0.95
WebMapV2Spec.jsFile · 0.80
WebMapV2Spec.jsFile · 0.80
mapbox-gl.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected