29 lines
560 B
TypeScript
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
|
|
}
|
|
|
|
}
|