new ol.supermap.Util()
openlayers/core/Util.js, line 9
Methods
-
ol.supermap.Util.createCanvasContext2D(opt_width, opt_height)
openlayers/core/Util.js, line 240 -
创建 2D 画布。
Name Type Description opt_width
number 画布宽度。
opt_height
number 画布高度。
-
ol.supermap.Util.Csv2GeoJSON(csv, options)
openlayers/core/Util.js, line 155 -
将 csv 格式转为 GeoJSON。
Name Type Description csv
Object csv 对象。
options
Object 转换参数。
-
ol.supermap.Util.isArray(obj){boolean}
openlayers/core/Util.js, line 145 -
判断是否为数组格式。
Name Type Description obj
Object 待判断对象。
Returns:
Type Description boolean 是否是数组。 -
ol.supermap.Util.resolutionToScale(resolution, dpi, mapUnit){number}
openlayers/core/Util.js, line 45 -
通过分辨率计算比例尺。
Name Type Description resolution
number 分辨率。
dpi
number 屏幕分辨率。
mapUnit
string 地图单位。
Returns:
Type Description number 比例尺。 -
ol.supermap.Util.scaleToResolution(scale, dpi, mapUnit){number}
openlayers/core/Util.js, line 102 -
通过比例尺计算分辨率。
Name Type Description scale
number 比例尺。
dpi
number 屏幕分辨率。
mapUnit
string 地图单位。
Returns:
Type Description number 分辨率。 -
ol.supermap.Util.supportWebGL2()
openlayers/core/Util.js, line 256 -
是否支持 webgl2。
-
ol.supermap.Util.toGeoJSON(smObj)
openlayers/core/Util.js, line 20 -
将传入对象转为 GeoJSON 格式。
Name Type Description smObj
Object 待转参数。
-
ol.supermap.Util.toProcessingParam(points)
openlayers/core/Util.js, line 77 -
将 Region 节点数组转为 Processing 服务需要的分析参数。
Name Type Description points
Array Region 各个节点数组。
Returns:
processing 服务裁剪、查询分析的分析参数。 -
ol.supermap.Util.toSuperMapBounds(bounds){SuperMap.Bounds}
openlayers/core/Util.js, line 62 -
转为 SuperMapBounds 格式。
Name Type Description bounds
Array.<number> bounds 数组。
Returns:
Type Description SuperMap.Bounds 返回 SuperMap 的 Bounds 对象。 -
ol.supermap.Util.toSuperMapGeometry(geoJSON)
openlayers/core/Util.js, line 32 -
将 GeoJSON 对象转为 SuperMap 几何图形。
Name Type Description geoJSON
GeoJSONObject GeoJSON 对象。