myLocation method

Future<GeoPoint> myLocation()
inherited

Implementation

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