updateMarker method
Update an existing marker
Implementation
Future<void> updateMarker({
required String markerId,
OlaLatLng? position,
double? iconRotation,
}) async {
try {
final args = <String, dynamic>{'markerId': markerId};
if (position != null) {
args['latitude'] = position.latitude;
args['longitude'] = position.longitude;
}
if (iconRotation != null) {
args['iconRotation'] = iconRotation;
}
await _channel.invokeMethod('updateMarker', args);
} catch (e) {
debugPrint('Error updating marker: $e');
}
}