getMarkerFromGeometry static method

Future<Marker>? getMarkerFromGeometry({
  1. required Point geom,
  2. required MarkerConfig markerConfig,
  3. required String markerId,
})

Implementation

static Future<Marker>? getMarkerFromGeometry({
  required jts.Point geom,
  required MarkerConfig markerConfig,
  required String markerId,
}) async {

  if (geom.getCoordinate() == null) {
    throw "Coordinates are Null while getting Marker";
  }

  LatLng position =  LatLng(geom.getCoordinate()!.y, geom.getCoordinate()!.x);

  return Marker(
    markerId: MarkerId(markerId),
    position: position,
    icon: await markerConfig.icon.future,
    infoWindow: markerConfig.infoWindow,
  );
}