Fixed overlay example to work with restructured GeoLayers.
This commit is contained in:
@@ -41,6 +41,10 @@ export class GeoLayer {
|
||||
}
|
||||
}
|
||||
|
||||
addChild(element) {
|
||||
this.displayObject.addChild(element)
|
||||
}
|
||||
|
||||
/**
|
||||
* Adapts to a map. If the maplayer should adapt to the parent maplayer,
|
||||
* no parameter must be specified.
|
||||
@@ -248,8 +252,10 @@ export class MapLayer extends GeoLayer {
|
||||
this.adapt()
|
||||
|
||||
this.changeHandler.call(this, map, oldMap)
|
||||
this.map.onTransform.add(this.transformed.bind(this))
|
||||
|
||||
//Call transform one time manually.
|
||||
this.transformed()
|
||||
this.map.onTransform.add(this.transformed.bind(this))
|
||||
} else {
|
||||
console.error("Could not set map, it's not of type GeoMap.", map)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user