Assert each layer is only added to the map once

This commit is contained in:
Andreas Hocevar
2020-01-24 16:05:58 +01:00
parent 97cb0bbd77
commit 1ee03decdd
3 changed files with 14 additions and 3 deletions

View File

@@ -245,3 +245,7 @@ Layer opacity must be a number.
`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled.
This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`.
### 67
A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both.