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

29 lines
560 B
TypeScript
Raw Normal View History

2023-11-28 21:10:12 +01:00
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
}
}