showMarker static method

Future showMarker({
  1. required MapType mapType,
  2. required Coords coords,
  3. required String title,
  4. String? description,
  5. int? zoom,
  6. Map<String, String>? extraParams,
})

Opens map app specified in mapType and shows marker at coords

Implementation

static Future<dynamic> showMarker({
  required MapType mapType,
  required Coords coords,
  required String title,
  String? description,
  int? zoom,
  Map<String, String>? extraParams,
}) async {
  final String url = getMapMarkerUrl(
    mapType: mapType,
    coords: coords,
    title: title,
    description: description,
    zoom: zoom,
    extraParams: extraParams,
  );

  final Map<String, String?> args = {
    'mapType': Utils.enumToString(mapType),
    'url': Uri.encodeFull(url),
    'title': title,
    'description': description,
    'latitude': coords.latitude.toString(),
    'longitude': coords.longitude.toString(),
  };
  return _channel.invokeMethod('showMarker', args);
}