Ongoing cleanup and refactoring of maps.
This commit is contained in:
@@ -184,12 +184,11 @@ export default class Overlay {
|
||||
return false
|
||||
},
|
||||
informationCallback = null,
|
||||
adjustItems = null
|
||||
adjustItems = null,
|
||||
cleanupItems = null
|
||||
} = {}) {
|
||||
const name = this.name[0].toUpperCase() + this.name.slice(1).toLowerCase() + ' Overlay'
|
||||
let geoLayer = new GeoLayer(new PIXI.Container(), { name })
|
||||
|
||||
console.log(this)
|
||||
geoLayer.visibility = this.zoomVisibility
|
||||
|
||||
if (this.rescale) geoLayer.rescale = this.rescale
|
||||
@@ -202,6 +201,9 @@ export default class Overlay {
|
||||
item.overlay = this
|
||||
let graphics = this.createItem(item, informationCallback)
|
||||
geoLayer.addChild(graphics)
|
||||
if (cleanupItems) {
|
||||
cleanupItems(item)
|
||||
}
|
||||
}
|
||||
})
|
||||
return geoLayer
|
||||
|
||||
Reference in New Issue
Block a user