CommonTools
CommonTools class
Static Method Summary
Static Public Methods | ||
public static |
downloadFromUrl(url: String, output_file_name: String): Null Download file |
|
public static |
exportData(data: String, output_file_name: String, output_mime_type: String): Null Export data |
|
public static |
geoJsonFCToGC(featureCollection: Object): Object GeoJson featureCollection to geometryCollection, if failed return null |
|
public static |
geoJsonToGC(geojson: *): * |
|
public static |
Gets the coordinates of the shape |
|
public static |
getShapeType(shape: Object): Number Get shape type |
|
public static |
stopDomEvent(e: DomEvent): null Stop the passing of events |
|
public static |
stringLTrim(str: String): String Trim string left |
|
public static |
stringRTrim(str: String): String Trim string right |
|
public static |
stringRemoveBlank(str: String): String Remove blanks of string |
|
public static |
stringTrim(str: String): String Trim string left and right |
Static Public Methods
public static downloadFromUrl(url: String, output_file_name: String): Null source
Download file
Return:
Null |
public static exportData(data: String, output_file_name: String, output_mime_type: String): Null source
Export data
Return:
Null |
public static geoJsonFCToGC(featureCollection: Object): Object source
GeoJson featureCollection to geometryCollection, if failed return null
Params:
Name | Type | Attribute | Description |
featureCollection | Object | geojson featureCollection format |
public static geoJsonToGC(geojson: *): * source
Params:
Name | Type | Attribute | Description |
geojson | * |
Return:
* |
public static getCoords(shape: Object): LatLng[] source
Gets the coordinates of the shape
Params:
Name | Type | Attribute | Description |
shape | Object | shape object |
public static getShapeType(shape: Object): Number source
Get shape type
Params:
Name | Type | Attribute | Description |
shape | Object | shape object |
public static stopDomEvent(e: DomEvent): null source
Stop the passing of events
Params:
Name | Type | Attribute | Description |
e | DomEvent | Map Dom event |
public static stringLTrim(str: String): String source
Trim string left
Params:
Name | Type | Attribute | Description |
str | String | string |
public static stringRTrim(str: String): String source
Trim string right
Params:
Name | Type | Attribute | Description |
str | String | string |