setIconStaticPositions method
change Marker of specific static points
we need to global key to recuperate widget from tree element
id
: (String) id of the static group geopoint
markerIcon
: (MarkerIcon) new marker that will set to the static group geopoint
Implementation
@override
Future<void> setIconStaticPositions(
String id,
MarkerIcon markerIcon, {
bool refresh = false,
}) async {
osmWebFlutterState.widget.dynamicMarkerWidgetNotifier.value = markerIcon;
await Future.delayed(duration, () async {
final base64Icon = (await capturePng(
osmWebFlutterState.dynamicMarkerKey!,
)).convertToString();
await interop
.setIconStaticGeoPoints(mapIdMixin.toJS, id.toJS, base64Icon.toJS)
.toDart;
});
}