zoomToLocation method

Future<void> zoomToLocation(
  1. OlaLatLng location,
  2. double zoomLevel
)

Zoom to a specific location on the map

Implementation

Future<void> zoomToLocation(OlaLatLng location, double zoomLevel) async {
  try {
    await _channel.invokeMethod('zoomToLocation', {
      'latitude': location.latitude,
      'longitude': location.longitude,
      'zoomLevel': zoomLevel,
    });
  } catch (e) {
    debugPrint('Error zooming to location: $e');
  }
}