burguillos.info/js-src/conquer/map-node.ts

29 lines
560 B
TypeScript

import Style from 'ol/style/Style'
import Feature from 'ol/Feature'
export default class MapNode {
private style: Style
private node: Feature
private id: string
constructor(style: Style, node: Feature, id: string) {
this.style = style
this.node = node.clone()
this.id = id
this.node.setProperties({type: this.id})
}
public getId(): string {
return this.id
}
public getNode(): Feature {
return this.node
}
public getStyle(): Style {
return this.style
}
}