myLocation method

Future<GeoPoint> myLocation()
inherited

Implementation

Future<GeoPoint> myLocation() async {
  final locateResp = (await interop.locateMe(mapIdMixin.toJS).toDart).toDart;
  Map<String, dynamic>? value = json.decode(locateResp);
  if (value!.containsKey("error")) {
    throw Exception(value["message"]);
  }
  return GeoPoint.fromMap(Map<String, double>.from(value));
}