setIconMarker method
setIconMarker this method change marker icon , marker should be already exist in the map or it will throw exception that marker not exist
point
: (geoPoint) geoPoint that want to change Icon
markerIcon
: (MarkerIcon) the new icon marker that will replace old icon
Implementation
@override
Future<void> setIconMarker(GeoPoint point, MarkerIcon markerIcon) async {
osmWebFlutterState.widget.dynamicMarkerWidgetNotifier.value = markerIcon;
await Future.delayed(duration, () async {
final icon = await capturePng(osmWebFlutterState.dynamicMarkerKey!);
final jsP = point.toGeoJS();
await interop.modifyMarker(mapIdMixin, jsP, icon.convertToString());
});
}