Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions lib/src/layer/marker_layer/marker_layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,22 @@ class MarkerLayer extends StatelessWidget {

// Shift original coordinate along worlds, then move into relative
// to origin space
final shiftedLocalPoint =
Offset(shiftedX, pxPoint.dy) - map.pixelOrigin;

final shiftedLocalPoint = Offset(shiftedX, pxPoint.dy) - map.pixelOrigin;

final markerKey = m.key ?? ObjectKey(m);
return Positioned(
key: m.key,
width: m.width,
height: m.height,
left: shiftedLocalPoint.dx - right,
top: shiftedLocalPoint.dy - bottom,
child: (m.rotate ?? rotate)
? Transform.rotate(
angle: -map.rotationRad,
alignment: (m.alignment ?? alignment) * -1,
child: m.child,
)
: m.child,
);
key: ValueKey('$markerKey@$shiftedX'),
width: m.width,
height: m.height,
left: shiftedLocalPoint.dx - right,
top: shiftedLocalPoint.dy - bottom,
child: RepaintBoundary(child: (m.rotate ?? rotate)
? Transform.rotate(
angle: -map.rotationRad,
alignment: (m.alignment ?? alignment) * -1,
child: m.child,
)
: m.child));
}

// Create marker in main world, unless culled
Expand Down
Loading