Module: ol/array

ol/array


import * as olArray from 'ol/array';

函数s

stableSort(arr, compareFnc)

import {stableSort} from 'ol/array';

对传入的数组进行排序,使相等元素的相对顺序保持不变。详见 https://en.wikipedia.org/wiki/Sorting_algorithm#Stability

Name Type Description
arr Array.<*>

要排序的数组(修改原数组)。

compareFnc function

比较函数。

Deprecated
  • Yes

Type Definitions

NearestDirection函数()

getZForResolution 可以使用此类型的函数来确定使用哪个最近的分辨率。

此函数接受 {number}(表示两个数组条目之间的值)、{number}(表示最接近的较高条目的值)和 {number}(表示最接近的较低条目的值)作为参数,返回 {number}。如果返回负数或零,将使用较低的值;如果返回正数,将使用较高的值。