setMarkerLocation method

void setMarkerLocation(
  1. String id,
  2. LatLng _location,
  3. Uint8List? markerIcon, {
  4. String? title,
})

Function to set marker locations

Implementation

void setMarkerLocation(String id, LatLng _location, Uint8List? markerIcon,
    {String? title}) async {
  _markers.add(Marker(
      markerId: MarkerId("${uniqueID + id}"),
      position: _location,
      draggable: enableDragMarker,
      icon: BitmapDescriptor.fromBytes(markerIcon!),
      onDragEnd: (newLoc) {
        if (enableDragMarker) {
          updateNewMarkerLocation(id, newLoc);
        }
      },
      infoWindow:
          InfoWindow(title: title, snippet: "Area Polygon Nomor $id")));

  notifyListeners();
}