CommonTools
通用工具类
Static Method Summary
Static Public Methods | ||
public static |
appendTokenToData(data: *): * |
|
public static |
appendTokenToUrl(url: *): * |
|
public static |
downloadFromUrl(url: String, output_file_name: String): Null 下载文件 |
|
public static |
exportBase64UrlToImage(urlData: *, output_file_name: *) |
|
public static |
exportData(data: String, output_file_name: String, output_mime_type: String): Null 导出数据 |
|
public static |
extractParameterFromSearch(search: *, param: *): * |
|
public static |
geoJsonFCToGC(featureCollection: Object): Object GeoJSON文件的featureCollection类型转到geometryCollection类型,如果失败则返回空 |
|
public static |
geoJsonToGC(geojson: *): * |
|
public static |
获取图形的坐标 |
|
public static |
getGeomFromFeatureCollection(featureCollection: *): * |
|
public static |
getMapIntegerZoom(map: *, is_google: *): * |
|
public static |
getShapeType(shape: Object): Number 获取形状类型 |
|
public static |
getTimeString(s: *): * |
|
public static |
getUrlname(url: *): * 获取url的名称 |
|
public static |
hexToRGB(hex: *, alpha: *): * Hex转RGB |
|
public static |
pickObject(obj: *, arr: *): * |
|
public static |
runTurfCallback(callback: *) |
|
public static |
setMapStandardScale(map: *, standard_scale: *) |
|
public static |
stopDomEvent(e: DomEvent): null 停止继续传递事件 |
|
public static |
stringLTrim(str: String): String 删除字符串左边的空白字符 |
|
public static |
stringRTrim(str: String): String 删除字符串右边的空白字符 |
|
public static |
stringRemoveBlank(str: String): String 删除字符串的空白字符 |
|
public static |
stringTrim(str: String): String 删除字符串左边和右边的空白字符 |
Static Public Methods
public static appendTokenToData(data: *): * source
Params:
Name | Type | Attribute | Description |
data | * |
Return:
* |
public static appendTokenToUrl(url: *): * source
Params:
Name | Type | Attribute | Description |
url | * |
Return:
* |
public static exportBase64UrlToImage(urlData: *, output_file_name: *) source
Params:
Name | Type | Attribute | Description |
urlData | * | ||
output_file_name | * |
public static exportData(data: String, output_file_name: String, output_mime_type: String): Null source
导出数据
Return:
Null |
public static extractParameterFromSearch(search: *, param: *): * source
Params:
Name | Type | Attribute | Description |
search | * | ||
param | * |
Return:
* |
public static geoJsonFCToGC(featureCollection: Object): Object source
GeoJSON文件的featureCollection类型转到geometryCollection类型,如果失败则返回空
Params:
Name | Type | Attribute | Description |
featureCollection | Object | featureCollection格式的GeoJSON数据 |
public static geoJsonToGC(geojson: *): * source
Params:
Name | Type | Attribute | Description |
geojson | * |
Return:
* |
public static getCoords(shape: Object): LatLng[] source
获取图形的坐标
Params:
Name | Type | Attribute | Description |
shape | Object | 图形对象 |
public static getGeomFromFeatureCollection(featureCollection: *): * source
Params:
Name | Type | Attribute | Description |
featureCollection | * |
Return:
* |
public static getMapIntegerZoom(map: *, is_google: *): * source
Params:
Name | Type | Attribute | Description |
map | * | ||
is_google | * |
Return:
* |
public static getShapeType(shape: Object): Number source
获取形状类型
Params:
Name | Type | Attribute | Description |
shape | Object | 图形对象 |
public static getUrlname(url: *): * source
获取url的名称
Params:
Name | Type | Attribute | Description |
url | * |
Return:
* |
public static hexToRGB(hex: *, alpha: *): * source
Hex转RGB
Params:
Name | Type | Attribute | Description |
hex | * | ||
alpha | * |
Return:
* |
public static pickObject(obj: *, arr: *): * source
Params:
Name | Type | Attribute | Description |
obj | * | ||
arr | * |
Return:
* |
public static runTurfCallback(callback: *) source
Params:
Name | Type | Attribute | Description |
callback | * |
public static setMapStandardScale(map: *, standard_scale: *) source
Params:
Name | Type | Attribute | Description |
map | * | ||
standard_scale | * |
public static stopDomEvent(e: DomEvent): null source
停止继续传递事件
Params:
Name | Type | Attribute | Description |
e | DomEvent | 地图Dom事件 |
public static stringLTrim(str: String): String source
删除字符串左边的空白字符
Params:
Name | Type | Attribute | Description |
str | String | 目标字符串 |
public static stringRTrim(str: String): String source
删除字符串右边的空白字符
Params:
Name | Type | Attribute | Description |
str | String | 目标字符串 |