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

Function getCRSExtent

src/maplibregl/mapping/InitMap.js:76–84  ·  view source on GitHub ↗

* @private * @function getCrsExtent * @description 获取当前坐标系范围,[左,下,右,上]。 * @param {Object|Array} extent -坐标系范围。 * @returns {Array}

(extent)

Source from the content-addressed store, hash-verified

74 * @returns {Array}
75 */
76function getCRSExtent(extent) {
77 if (extent instanceof Array) {
78 return extent;
79 }
80 if (extent.leftBottom && extent.rightTop) {
81 return [extent.leftBottom.x, extent.leftBottom.y, extent.rightTop.x, extent.rightTop.y];
82 }
83 return [extent.left, extent.bottom, extent.right, extent.top];
84}
85
86/**
87 * @private

Callers 1

defineCRSByWKTFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected