Ongoing cleanup and refactoring of maps.
This commit is contained in:
+21
-7
@@ -88,18 +88,32 @@ export default class MapApp extends PIXIApp {
|
||||
this._setupKeyboardUtils()
|
||||
}
|
||||
|
||||
/**
|
||||
* Log boundaries for a shown map.
|
||||
* This is for development purposes only, if you want
|
||||
* to find the boundaries of a shown map.
|
||||
*
|
||||
* @memberof MapApp
|
||||
*/
|
||||
logMapBoundaries() {
|
||||
let map = this.mapLayer.map
|
||||
|
||||
let boundaries = {
|
||||
min: this.mapLayer.mapview.coordinatesFromWindowPoint(map, { x: 0, y: 0 }),
|
||||
max: this.mapLayer.mapview.coordinatesFromWindowPoint(map, { x: 0, y: 0 })
|
||||
}
|
||||
|
||||
console.log(JSON.stringify(boundaries))
|
||||
}
|
||||
|
||||
_setupMapLayer() {
|
||||
this.mapContainer = new PIXI.Container()
|
||||
console.log(this.mapList)
|
||||
this.mapLayer = new MapLayer(this.mapList, this.scene, this.mapContainer, {
|
||||
name: 'Map Layer',
|
||||
name: 'Root Map Layer',
|
||||
focus: this.focus,
|
||||
zoom: this.zoom
|
||||
zoom: this.zoom,
|
||||
onChange: this._mapChanged.bind(this)
|
||||
})
|
||||
|
||||
this.mapLayer.changeHandler.add(this._mapChanged.bind(this))
|
||||
|
||||
if (this.mapList.map) this.mapLayer.changeMap(this.mapList.map)
|
||||
}
|
||||
|
||||
setup() {
|
||||
|
||||
Reference in New Issue
Block a user