myLocation method

  1. @override
Future<GeoPoint> myLocation(
  1. int idMap
)
override

Implementation

@override
Future<GeoPoint> myLocation(int idMap) async {
  try {
    Map<String, dynamic> map =
        (await _channels[idMap]!.invokeMapMethod("user#position"))!;
    return GeoPoint(latitude: map["lat"], longitude: map["lon"]);
  } on PlatformException catch (e) {
    throw GeoPointException(msg: e.message);
  }
}