Closed qugu2427 closed 1 month ago
Thank you @qugu2427 for raising the PR, could you please add some test screenshot/video in this PR?
@junqiu-lei sure, here is a video of the issue currently and with the refresh method with_current_update_func.webm with_refresh_func.webm
The cypress failure of documentsLayer is due to CI runner capacity.
Description
UpdateLayerConfig()
is broken as per https://github.com/opensearch-project/dashboards-maps/issues/601. Specifically, line 36maplibreInstance.style.sourceCaches[layerConfig.id].update(maplibreInstance.transform)
throws a object reference error. I suspectmaplibreInstance.transform
is gone by the time it's used. Additionally, there are alot of what seem to be workarounds in the function, namely calling seemingly private methods of MaplibreGL and a spelling mistake. While I am by no means familiar with this codebase, it seems that simply deleting and refreshing the layer+source would be a better option. Especially, since updating wms fields would require a full refresh of tiles anyway.Issues Resolved
https://github.com/opensearch-project/dashboards-maps/issues/601
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.