parseMarkerToFMap function

Marker parseMarkerToFMap(
  1. CustomMarker marker
)

Implementation

fmap.Marker parseMarkerToFMap(CustomMarker marker) {
  return fmap.Marker(
    point: LatLng(marker.position.latitude, marker.position.longitude),
    child: GestureDetector(
      onTap: marker.onTap,
      child: Transform.rotate(
        angle: marker.rotation.toDouble() * math.pi / 180,
        child: marker.widget,
      ),
    ),
    width: marker.width,
    height: marker.height,
    alignment: marker.alignment,
    // flutter_map draws a marker turned with the map unless told to turn it
    // back. An upright marker is turned back; a flat one is left lying.
    rotate: !marker.flat,
  );
}