Added functionality and dark mode to doctests. And other changes in maps.
This commit is contained in:
@@ -26,7 +26,6 @@ export class GeoGraphics {
|
||||
this.drawEndHandler = new EventHandler('onDrawEnd', { listeners: onDrawEnd })
|
||||
this._points = null
|
||||
this._position = null
|
||||
this.map = null
|
||||
}
|
||||
|
||||
clone() {
|
||||
@@ -92,7 +91,6 @@ export class GeoGraphics {
|
||||
* Called by the containing geo layer, when the map changes.
|
||||
*/
|
||||
adaptTo(map) {
|
||||
this.map = map
|
||||
this._points = this._adaptCoordinates(map)
|
||||
this._updatePosition()
|
||||
this.draw()
|
||||
@@ -135,23 +133,21 @@ export class GeoGraphics {
|
||||
this._layer = layer
|
||||
}
|
||||
|
||||
// get map() {
|
||||
// if (
|
||||
// this.graphics.layer &&
|
||||
// (this.graphics.layer instanceof GeoLayer || this.graphics.layer instanceof MapLayer)
|
||||
// ) {
|
||||
// return this.graphics.layer.map
|
||||
// } else return null
|
||||
// }
|
||||
get map() {
|
||||
let map = null
|
||||
if (this.mapLayer) {
|
||||
map = this.mapLayer.map
|
||||
}
|
||||
return map
|
||||
}
|
||||
|
||||
// get mapLayer() {
|
||||
// if (
|
||||
// this.graphics.layer &&
|
||||
// (this.graphics.layer instanceof GeoLayer || this.graphics.layer instanceof MapLayer)
|
||||
// ) {
|
||||
// return this.graphics.layer.mapLayer
|
||||
// } else return null
|
||||
// }
|
||||
get mapLayer() {
|
||||
let mapLayer = null
|
||||
if (this.layer) {
|
||||
mapLayer = this.layer.mapLayer
|
||||
}
|
||||
return mapLayer
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare draw is a private function, that prepares the graphics
|
||||
|
||||
Reference in New Issue
Block a user