Add a map property to layers

This commit is contained in:
Tim Schaub
2021-11-12 17:11:26 -07:00
parent 080fe8ca67
commit 371bb85350
7 changed files with 446 additions and 24 deletions
+16
View File
@@ -258,6 +258,22 @@ class Layer extends BaseLayer {
}
}
/**
* For use inside the library only.
* @param {import("../PluggableMap.js").default} map Map.
*/
setMapInternal(map) {
this.set(LayerProperty.MAP, map);
}
/**
* For use inside the library only.
* @return {import("../PluggableMap.js").default} Map.
*/
getMapInternal() {
return this.get(LayerProperty.MAP);
}
/**
* Sets the layer to be rendered on top of other layers on a map. The map will
* not manage this layer in its layers collection, and the callback in