toScreenLocation method

  1. @override
Future<Point<num>> toScreenLocation(
  1. LatLng latLng
)
override

Implementation

@override
Future<Point> toScreenLocation(LatLng latLng) async {
  try {
    var screenPosMap =
        await _channel.invokeMethod('map#toScreenLocation', <String, dynamic>{
      'latitude': latLng.latitude,
      'longitude': latLng.longitude,
    });
    return Point(screenPosMap['x'], screenPosMap['y']);
  } on PlatformException catch (e) {
    return new Future.error(e);
  }
}