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

Method fromArray

src/common/commontypes/LonLat.js:179–184  ·  view source on GitHub ↗

* @function LonLat.fromArray * @description 通过数组生成一个 LonLat 对象。 * @param {Array. } arr - 数组的格式,长度只能为2,:[Lon,Lat]。如:[5,-42]。 * @returns {LonLat} LonLat 对象。

(arr)

Source from the content-addressed store, hash-verified

177 * @returns {LonLat} {@link LonLat} 对象。
178 */
179 static fromArray(arr) {
180 var gotArr = Util.isArray(arr),
181 lon = gotArr && arr[0],
182 lat = gotArr && arr[1];
183 return new LonLat(lon, lat);
184 }
185
186
187}

Callers 2

parseFeatureMethod · 0.45
nFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected