Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching from 2D to 3D activity if a GeoJson layer is visible raises an error #169

Closed
claustres opened this issue Apr 6, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@claustres
Copy link
Member

The following error is raised when switching from 2D to 3D activity if a GeoJson layer has been imported and is visible: TypeError: Cannot read property 'features' of undefined.

Linked to kalisio/kdk#328.

@claustres claustres added the bug Something isn't working label Apr 6, 2021
@robinbourianes-kalisio
Copy link
Collaborator

What happens is destroyed gets called from mixin.base-map which calls this.map.remove()
this.map.remove() iterate over it's layer calling remove() on them
Realtime layer's remove method expects a geojson parameter which is then undefined, generating an exception.

We probably should clear the map before this.map.remove() in mixin.base-map destroyed.

@robinbourianes-kalisio
Copy link
Collaborator

The layer on which the error occurs is the selection layer that is added by mixin.feature-selection

@claustres
Copy link
Member Author

claustres commented Apr 7, 2021

Right, the issue has been identified in kalisio/kdk#328, waiting for maintainer feedback.

What is strange is that the map should have been already cleaned here but it seems the layer is still referenced in Leaflet.

@claustres
Copy link
Member Author

Seems to be closed now, possibly linked to kalisio/kdk#328.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants