cellsysBase/cellsysMark.js

78 lines
1.6 KiB
JavaScript
Raw Permalink Normal View History

2024-08-14 16:20:56 +08:00
/*
* @Author: ag
* @LastEditTime: 2021-11-02 18:06:08
* @LastEditors: ag
* @Description:
*/
import {CellsysType} from './cellsysUtil.js'
import CellsysElement from './cellsysElement.js'
class CellsysMark extends CellsysElement{
constructor(params) {
if (!params) {
params = {}
}
super(params)
this.cellsysType = CellsysType.Marker
this.orgId = params.org_id
this.orgName = params.org_name
this.id = params.id
this.name = params.name
this.type = params.type
this.status = params.status
this.action = params.action||0
this.bufferDistance = params.buffer_distance || 0
this.radius = params.radius || 0
this.geometry = params.geometry
this.typeName = params.type_name
this.style = params.style ? params.style : {}
this.description = params.description
this.typeDescription = params.type_description
}
setId(value) {
this.id = value
}
setName(name) {
this.name = name
}
setType(type) {
this.type = type
}
setAction(value) {
this.action = value
}
setBufferDistance(value) {
this.bufferDistance = value
}
setDescription(value) {
this.description = value
}
setGeometry(value) {
this.geometry = value
}
getIcon() {
return this.style ? this.style.icon : null
}
getIconUrl() {
return this.style ? this.style.path : null
}
getColor() {
return this.style ? this.style.color : null
}
}
export default CellsysMark