* @function LonLat.fromArray * @description 通过数组生成一个 LonLat 对象。 * @param {Array. } arr - 数组的格式,长度只能为2,:[Lon,Lat]。如:[5,-42]。 * @returns {LonLat} LonLat 对象。
(arr)
| 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 | } |
no outgoing calls
no test coverage detected