setIconStaticPositions method

  1. @override
Future<void> setIconStaticPositions(
  1. String id,
  2. MarkerIcon markerIcon, {
  3. bool refresh = false,
})

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,
      id,
      base64Icon,
    );
  });
}