Load KML data in the same fashion GeoJSON data/style are loaded #558
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
meaning we load these data whenever such a layer is added to the map, through a store plugin.
I also moved the "metadata" attribute that was sitting in AbstractLayer into KMLLayer, as it is only used by this layer so far (and I don't see any use cases where it would be by any other layer type) This way, the addToMap attribute could also be removed and replaced by the same logic as the GeoJSON and external layer async management, meaning the flag isLoading
The logic to add, or not add, the KML layer to the map is now dependent if the KML layer is the one being edited by the drawing module, and if the drawing module is active (no need for the addToMap flag anymore, this information is derived from others we already have)
Test link