Class: Util

ol.supermap.Util

The tool class.

new ol.supermap.Util()

D:/iClient9_English0919/src/openlayers/core/Util.js, line 6

Methods

ol.supermap.Util.createCanvasContext2D(opt_width, opt_height)

D:/iClient9_English0919/src/openlayers/core/Util.js, line 237

Create a CanvasContext2D.

Name Type Description
opt_width number

Width of the canvas.

opt_height number

Height of the canvas.

ol.supermap.Util.Csv2GeoJSON(csv, options)

D:/iClient9_English0919/src/openlayers/core/Util.js, line 152

Transform csv to GeoJSON.

Name Type Description
csv Object

The object of csv.

options Object

The parameters of the transform.

ol.supermap.Util.isArray(obj){boolean}

D:/iClient9_English0919/src/openlayers/core/Util.js, line 142

Determine whether it is an array.

Name Type Description
obj Object

The object to be determined.

Returns:
Type Description
boolean Whether it is an array.

ol.supermap.Util.resolutionToScale(resolution, dpi, mapUnit){number}

D:/iClient9_English0919/src/openlayers/core/Util.js, line 42

Compute scale by the resolution.

Name Type Description
resolution number

The resolution.

dpi number

The resolution of screen.

mapUnit string

The unit of the map.

Returns:
Type Description
number The scale.

ol.supermap.Util.scaleToResolution(scale, dpi, mapUnit){number}

D:/iClient9_English0919/src/openlayers/core/Util.js, line 99

Compute resolution by the scale.

Name Type Description
scale number

The scale.

dpi number

The resolution of screen.

mapUnit string

The unit of the map.

Returns:
Type Description
number The resolution.

ol.supermap.Util.supportWebGL2()

D:/iClient9_English0919/src/openlayers/core/Util.js, line 253

Whether to support webgl2.

ol.supermap.Util.toGeoJSON(smObj)

D:/iClient9_English0919/src/openlayers/core/Util.js, line 17

Transform the passed object to GeoJSON.

Name Type Description
smObj Object

The object to be passed.

ol.supermap.Util.toProcessingParam(points)

D:/iClient9_English0919/src/openlayers/core/Util.js, line 74

Transform the array of nodes about the region to the processing analysis service parameters.

Name Type Description
points Array

The array of nodes about region.

Returns:
The processing service cut、the query analysis and the parameters of the analysis.

ol.supermap.Util.toSuperMapBounds(bounds){SuperMap.Bounds}

D:/iClient9_English0919/src/openlayers/core/Util.js, line 59

Turn into SuperMapBounds.

Name Type Description
bounds Array.<number>

An array of bounds.

Returns:
Type Description
SuperMap.Bounds Return SuperMapBounds.

ol.supermap.Util.toSuperMapGeometry(geoJSON)

D:/iClient9_English0919/src/openlayers/core/Util.js, line 29

Transform the geoJSON to SuperMap geomotry.

Name Type Description
geoJSON GeoJSONObject

The object of geoJSON.