hslayers / hslayers-ng

User interface and map building extensions for OpenLayers
https://ng.hslayers.org/
MIT License
37 stars 20 forks source link

Cannot read property 'getSource' of null #1954

Closed DailisLangovskis closed 3 years ago

DailisLangovskis commented 3 years ago

err When loading layer from layman inside the draw toolbar!

fzadrazil commented 3 years ago

It happens even when trying to create a new drawing layer.

FilipLeitner commented 3 years ago

On current develop and without an error I was able to :

fzadrazil commented 3 years ago

It happens when you are not logged in, open draw panel, click on New drawing layer, Login from the dialog and try to create new layer. It crashes on this line as this.selectedLayer is null https://github.com/hslayers/hslayers-ng/blob/c91cae1e30ddd23c64dedef4645969a541f96380/projects/hslayers/src/components/draw/draw.service.ts#L410