Added functionality and dark mode to doctests. And other changes in maps.

This commit is contained in:
2019-11-20 15:59:10 +01:00
parent 89395ba641
commit 6dcf6d38da
13 changed files with 8261 additions and 8520 deletions
+14 -18
View File
@@ -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