selectAdvancedPositionPicker method

Future<GeoPoint> selectAdvancedPositionPicker()

to retrieve location desired

Implementation

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

  await cancelAdvancedPositionPicker();
  changeLocation(gp);
  return gp;
}