capacitor-plugins
capacitor-plugins copied to clipboard
feat(google-maps): Optimize addMarkers method for improved performance
- Replacing individual coroutines for each marker with a single coroutine to build all MarkerOptions in bulk.
- Utilizing withContext instead of multiple CoroutineScope instances to switch between Main and IO dispatchers efficiently.
- Grouping map operations to add all markers to the ClusterManager at once and triggering clustering only after all markers are added.
These changes aim to reduce overhead and improve the responsiveness of the map when adding multiple markers.