MapConfig
Extends:
Map config manager, singleton
Static Method Summary
Static Public Methods | ||
public static |
Get instance object(Singleton mode) |
Constructor Summary
Public Constructor | ||
public |
Constructor |
Method Summary
Public Methods | ||
public |
Get control array |
|
public |
Find layer object from |
|
public |
Get projection(esri) in config file. |
|
public |
Get projection(proj4) in config file. |
|
public |
getControl(controlType: String): Object Get control |
|
public |
getControlHeight(control: String): String Get control height |
|
public |
getControlPosition(control: String): String Get control position |
|
public |
getControlProperty(control: String, property: String): String Get control property |
|
public |
getControlType(control: Object): String Get control type |
|
public |
getControlWidth(control: String): String Get control width |
|
public |
getControlpermission(control: Object): String[] Get control permission |
|
public |
Get the option of draw control |
|
public |
Get map whole range |
|
public |
Get map initialize range |
|
public |
Get map language |
|
public |
getLayerID(layer: Object): Number Get layer ID |
|
public |
getLayerIcon(layer: Object): String Get icon path of layer |
|
public |
getLayerKey(layer: Object): String Get layer key |
|
public |
getLayerLabel(layer: Object): String Get display name of layer |
|
public |
getLayerOpacity(layer: Object): Number Get opacity of layer |
|
public |
getLayerSourceName(layer: Object): String Get data source name of layer |
|
public |
getLayerSubLayer(layer: Object): Array Get sub layer array of the layer |
|
public |
getLayerTooltip(layer: Object): String Get Tooltip of layer |
|
public |
getLayerType(layer: Object): String Get the layer type |
|
public |
getLayerpermission(layer: Object): String[] Get layer permissions |
|
public |
Get map min scale index |
|
public |
getOriginSourceName(source: Object): String Get data source old name |
|
public |
Get projection information(esri). |
|
public |
Get projection information(proj4). |
|
public |
Get projection bound. |
|
public |
Get projection origin. |
|
public |
Gets the option of the rubber box control |
|
public |
getScaleByIndex(index: Number): Number Get scale from scale index. |
|
public |
getScaleID(scale: Object): Number Get scale ID, in google mode, ID is the level of google scale. |
|
public |
getSourceByName(sourceName: String, isOrigin: Boolean): Object Get data source object from data source name |
|
public |
getSourceLayerType(source: Object): String Get layer type of data source. |
|
public |
getSourceLayers(source: Object): Array Get layers of data source. |
|
public |
getSourceName(source: Object): String Get data source name |
|
public |
getSourceType(source: Object): String Get data source type |
|
public |
getSourceUrl(source: Object): String Get data source url |
|
public |
getSourceUrl_GeometryService(source: Object): String Get data source geometry service url |
|
public |
getSourceUrl_IPPort(source: Object): String Get data source ip and port url |
|
public |
getSubControl(parent_control: Object, subcontrol_type: String): Object Get ths sub control of parent control |
|
public |
getSubControls(parent_control: Object): Object Get ths sub controls of parent control |
|
public |
Returns the maximum number of selected tree controls |
|
public |
Get unit |
|
public |
Initialize |
|
public |
isControlHasPermission(control: Object): Boolean Does control have permissions |
|
public |
Is using google scale |
|
public |
isHasControl(controlType: String): Boolean If has control |
|
public |
isLayerDynamic(layer: Object): Boolean Is layer dynamic |
|
public |
isLayerGroup(layer: Object): Boolean If the layer is a composite layer |
|
public |
isLayerHasPermission(layer: Object): Boolean Does layer have permissions |
|
public |
isLayerHistory(layer: Object): Boolean Is layer the history layer |
|
public |
isLayerMask(layer: Object): Boolean Is layer the mask layer |
|
public |
isLayerMini(layer: Object): Boolean If the layer is for mini map |
|
public |
isLayerUse(layer: Object): Boolean Is layer used in the layer tree |
|
public |
isLayerVisible(layer: Object): Boolean Is layer selected by default |
|
public |
the language of using |
|
public |
Get layer list |
|
public |
maskLayers(): Array Get the mask layer list |
|
public |
miniLayers(): Array Get mini layer list |
|
public |
permission(value: String[]): String[] Set or obtain permissions if not passed parameters are obtained |
|
public |
resolutions(): Array Get resolutions, meter / pixel |
|
public |
scaleIDToIndex(id: Number): Number Convert scale ID to scale index. |
|
public |
scaleIndexToID(index: Number): Number Convert scale index to scale ID. |
|
public |
Get scale list |
|
public |
setDrawOption(option: Object): Null Set the option of draw control |
|
public |
setLayerOpacity(layer: Object, opacity: Number): Null Get opacity of layer |
|
public |
setRubberBandOption(option: Object): Null Set the options for a rubber box control |
|
public |
setSources(sources: Array): Array Set data source array |
|
public |
Get data source list |
|
public |
Get theme name |
|
public |
Get layer tree label |
Static Public Methods
Public Constructors
Public Methods
public getControl(controlType: String): Object source
Get control
Params:
Name | Type | Attribute | Description |
controlType | String | control type, "zoom","tree" and so on. |
public getControlHeight(control: String): String source
Get control height
Params:
Name | Type | Attribute | Description |
control | String | control object. |
public getControlPosition(control: String): String source
Get control position
Params:
Name | Type | Attribute | Description |
control | String | control object. |
public getControlType(control: Object): String source
Get control type
Params:
Name | Type | Attribute | Description |
control | Object | control |
public getControlWidth(control: String): String source
Get control width
Params:
Name | Type | Attribute | Description |
control | String | control object. |
public getControlpermission(control: Object): String[] source
Get control permission
Params:
Name | Type | Attribute | Description |
control | Object | control object |
public getLayerID(layer: Object): Number source
Get layer ID
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public getLayerIcon(layer: Object): String source
Get icon path of layer
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public getLayerKey(layer: Object): String source
Get layer key
Params:
Name | Type | Attribute | Description |
layer | Object | object |
public getLayerLabel(layer: Object): String source
Get display name of layer
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public getLayerOpacity(layer: Object): Number source
Get opacity of layer
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public getLayerSourceName(layer: Object): String source
Get data source name of layer
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public getLayerSubLayer(layer: Object): Array source
Get sub layer array of the layer
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public getLayerTooltip(layer: Object): String source
Get Tooltip of layer
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public getLayerType(layer: Object): String source
Get the layer type
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public getLayerpermission(layer: Object): String[] source
Get layer permissions
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public getOriginSourceName(source: Object): String source
Get data source old name
Params:
Name | Type | Attribute | Description |
source | Object | data source object |
public getPrj(): String source
Get projection information(esri). If no projection, it will guess unit and set default projection.
public getProj4(): String source
Get projection information(proj4). If no projection, it will guess unit and set default projection.
public getScaleByIndex(index: Number): Number source
Get scale from scale index.
Params:
Name | Type | Attribute | Description |
index | Number | scale index |
public getScaleID(scale: Object): Number source
Get scale ID, in google mode, ID is the level of google scale.
Params:
Name | Type | Attribute | Description |
scale | Object | scale object |
public getSourceByName(sourceName: String, isOrigin: Boolean): Object source
Get data source object from data source name
public getSourceLayerType(source: Object): String source
Get layer type of data source. Final data source only have one layer type.(After preprocessing)
Params:
Name | Type | Attribute | Description |
source | Object | data source object |
public getSourceLayers(source: Object): Array source
Get layers of data source.
Params:
Name | Type | Attribute | Description |
source | Object | data source object |
public getSourceName(source: Object): String source
Get data source name
Params:
Name | Type | Attribute | Description |
source | Object | data source object |
public getSourceType(source: Object): String source
Get data source type
Params:
Name | Type | Attribute | Description |
source | Object | data source object |
public getSourceUrl(source: Object): String source
Get data source url
Params:
Name | Type | Attribute | Description |
source | Object | data source object |
public getSourceUrl_GeometryService(source: Object): String source
Get data source geometry service url
Params:
Name | Type | Attribute | Description |
source | Object | data source object |
public getSourceUrl_IPPort(source: Object): String source
Get data source ip and port url
Params:
Name | Type | Attribute | Description |
source | Object | data source object |
public getSubControl(parent_control: Object, subcontrol_type: String): Object source
Get ths sub control of parent control
public getSubControls(parent_control: Object): Object source
Get ths sub controls of parent control
Params:
Name | Type | Attribute | Description |
parent_control | Object | parent control |
public async initAsync(xmlstring: String, isZip: Boolean, callback: Function): Promise source
Initialize
public isControlHasPermission(control: Object): Boolean source
Does control have permissions
Params:
Name | Type | Attribute | Description |
control | Object | control object |
public isHasControl(controlType: String): Boolean source
If has control
Params:
Name | Type | Attribute | Description |
controlType | String | control type, "zoom","tree" and so on. |
public isLayerDynamic(layer: Object): Boolean source
Is layer dynamic
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public isLayerGroup(layer: Object): Boolean source
If the layer is a composite layer
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public isLayerHasPermission(layer: Object): Boolean source
Does layer have permissions
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public isLayerHistory(layer: Object): Boolean source
Is layer the history layer
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public isLayerMask(layer: Object): Boolean source
Is layer the mask layer
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public isLayerMini(layer: Object): Boolean source
If the layer is for mini map
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public isLayerUse(layer: Object): Boolean source
Is layer used in the layer tree
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public isLayerVisible(layer: Object): Boolean source
Is layer selected by default
Params:
Name | Type | Attribute | Description |
layer | Object | layer object |
public layers(isIncludeUnuse: Boolean): Array source
Get layer list
Params:
Name | Type | Attribute | Description |
isIncludeUnuse | Boolean | is include unused layer. |
public permission(value: String[]): String[] source
Set or obtain permissions if not passed parameters are obtained
Params:
Name | Type | Attribute | Description |
value | String[] | The permission values that you want to set |
public scaleIDToIndex(id: Number): Number source
Convert scale ID to scale index.
Params:
Name | Type | Attribute | Description |
id | Number | scale id |
public scaleIndexToID(index: Number): Number source
Convert scale index to scale ID.
Params:
Name | Type | Attribute | Description |
index | Number | scale index |
public setDrawOption(option: Object): Null source
Set the option of draw control
Params:
Name | Type | Attribute | Description |
option | Object | The option param |
|
option.importMaxFeatureCount | Number | The max importing feature count at a time |
|
option.isUseTxt | Boolean | If the value is true, it will enable 'txt' mode |
|
option.importTxtFunction | function(file: Object): null | When importing button is clicked in 'txt' mode, will run the function |
|
option.exportTxtFunction | function(): null | When exporting button is clicked in 'txt' mode, will run the function |
|
option.isUseExcel | Boolean | If the value is true, it will enable 'excel' mode |
|
option.importExcelFunction | function(file: Object): null | When importing button is clicked in 'excel' mode, will run the function |
|
option.exportExcelFunction | function(): null | When exporting button is clicked in 'excel' mode, will run the function |
Return:
Null |
public setLayerOpacity(layer: Object, opacity: Number): Null source
Get opacity of layer
Return:
Null |
public setRubberBandOption(option: Object): Null source
Set the options for a rubber box control
Return:
Null |