update waypoint marker positions
This commit is contained in:
@ -115,9 +115,10 @@ class _GpsPageState extends State<GpsPage> {
|
||||
]),
|
||||
zoom: 1,
|
||||
interactiveFlags: InteractiveFlag.pinchZoom | InteractiveFlag.drag,
|
||||
|
||||
onPositionChanged: (MapPosition pos, isvalue) {
|
||||
indexController.currentBound = [pos.bounds!];
|
||||
onPositionChanged: (MapPosition pos, bool hasGesture) {
|
||||
if (hasGesture) {
|
||||
indexController.currentBound = [pos.bounds!];
|
||||
}
|
||||
},
|
||||
onTap: (tapPos, cord) {}, // Hide popup when the map is tapped.
|
||||
),
|
||||
@ -126,13 +127,23 @@ class _GpsPageState extends State<GpsPage> {
|
||||
MarkerLayer(
|
||||
markers: gpsData.map((i) {
|
||||
return Marker(
|
||||
alignment: Alignment.center,
|
||||
height: 32.0,
|
||||
width: 120.0,
|
||||
width: 30.0, // Fixed width
|
||||
height: 30.0, // Fixed height
|
||||
point: LatLng(i.lat, i.lon),
|
||||
child: getMarkerShape(i));
|
||||
child: getMarkerShape(i),
|
||||
alignment: Alignment.center);
|
||||
}).toList(),
|
||||
)
|
||||
),
|
||||
// MarkerLayer(
|
||||
// markers: gpsData.map((i) {
|
||||
// return Marker(
|
||||
// alignment: Alignment.center,
|
||||
// height: 32.0,
|
||||
// width: 120.0,
|
||||
// point: LatLng(i.lat, i.lon),
|
||||
// child: getMarkerShape(i));
|
||||
// }).toList(),
|
||||
// )
|
||||
],
|
||||
),
|
||||
)),
|
||||
|
||||
Reference in New Issue
Block a user