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

Method getCenterPixel

src/common/commontypes/Bounds.js:232–235  ·  view source on GitHub ↗

* @function Bounds.prototype.getCenterPixel * @description 获取像素格式的范围中心点。 * @example * var bounds = new Bounds(-180,-90,100,80); * var pixel = bounds.getCenterPixel(); * @returns {Pixel} 像素格式的当前范围的中心点。

()

Source from the content-addressed store, hash-verified

230 * @returns {Pixel} 像素格式的当前范围的中心点。
231 */
232 getCenterPixel() {
233 return new Pixel((this.left + this.right) / 2,
234 (this.bottom + this.top) / 2);
235 }
236
237 /**
238 * @function Bounds.prototype.getCenterLonLat

Callers 2

BoundsSpec.jsFile · 0.80
_canvasUpdateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected