eclipsesource / eclipsesource/tabris-plugin-maps
Provide convenience API for removing all markers
- Dominant language
- Kotlin
- Stars
- 16
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
Currently, `marker.dispose()` removes the marker from the `map.getMarkers()` array. Something like:
```js
map.getMarkers().forEach(marker => marker.dispose());
```
... would not work, since the array would be modified by `marker.dispose()`. In this case one needs to use a reverse for loop, which is not very convenient:
```js
let markers = map.getMarkers();
for (let i = markers.length - 1; i >= 0; i--) {
markers[i].dispose();
}
```
I suggest offering a type for the markers collection similar to [`WidgetCollection`](https://tabrisjs.com/documentation/latest/api/WidgetCollection#widgetcollection), which allows disposing (e.g. `map.getMarkers().dispose()`) and configuring all markers at once.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.