changeMarker method
Future<void>
changeMarker(
- int idOSM,
- GeoPoint oldLocation,
- GeoPoint newLocation, {
- GlobalKey<
State< ? globalKeyIcon,StatefulWidget> > - double? angle = null,
- IconAnchor? iconAnchor,
override
Implementation
@override
Future<void> changeMarker(
int idOSM,
GeoPoint oldLocation,
GeoPoint newLocation, {
GlobalKey? globalKeyIcon,
double? angle = null,
IconAnchor? iconAnchor,
}) async {
Map<String, dynamic> args = {
"new_location": newLocation.toMap(),
"old_location": oldLocation.toMap(),
"angle": angle,
};
if (globalKeyIcon != null) {
final icon = await _capturePng(globalKeyIcon);
args["new_icon"] = icon;
}
if (iconAnchor != null) {
args["iconAnchor"] = iconAnchor.toMap();
}
await _channels[idOSM]!.invokeMethod("change#Marker", args);
}