flutter_animarker icon indicating copy to clipboard operation
flutter_animarker copied to clipboard

Duplication marker on position update

Open kwado-tech opened this issue 3 years ago • 9 comments

Flutter animaker package duplicates my marker on position updated. Below if my implementation

return Animarker(
      curve: Curves.bounceOut,
      // rippleRadius: 0.2,
      useRotation: true,
      // duration: Duration(milliseconds: 2300),
      mapId: mapController.future
          .then<int>((value) => value.mapId), //Grab Google Map Id
      markers: markers ?? const <Marker>{},
      child: GoogleMap(
        zoomControlsEnabled: false,
        myLocationEnabled: myLocationEnabled ?? true,
        myLocationButtonEnabled: false,
        compassEnabled: false,
        initialCameraPosition: initialCameraPosition,
        markers: markers ?? const <Marker>{},
        polylines: polylines ?? const <Polyline>{},
        onMapCreated: (controller) {
          // WidgetsBinding.instance.addPostFrameCallback((_) {
          // your code that moves the camera
          if (!mapController.isCompleted) mapController.complete(controller);
          // });
        },
        onCameraMove: onCameraMoveCallback,
      ),
    );

below is my result Screenshot_20210809-151814_Gallery

kwado-tech avatar Aug 09 '21 15:08 kwado-tech

Can you guide me how you draw polyline?

hasnainusti avatar Dec 08 '21 11:12 hasnainusti

Same issue any solution?

YassineChe avatar Dec 12 '21 17:12 YassineChe

Can you guide me how you draw polyline?

Use polyline attribute in GoogleMap widget

YassineChe avatar Dec 12 '21 18:12 YassineChe

Can you guide me how you draw polyline?

Use polyline attribute in GoogleMap widget

Can you provide any example? I'M drawing the polyline from start to end point but i want to draw it along the marker moving.

hasnainusti avatar Dec 16 '21 11:12 hasnainusti

Can you provide any example? I'M drawing the polyline from start to end point but i want to draw it along the marker moving.

Same as my situation, I will work on this tonight, i will reach out with you when i achieve it.. Best regards...

YassineChe avatar Dec 16 '21 17:12 YassineChe

Can you provide any example? I'M drawing the polyline from start to end point but i want to draw it along the marker moving.

Same as my situation, I will work on this tonight, i will reach out with you when i achieve it.. Best regards...

Hey, did you achieve it?

hasnainusti avatar Dec 21 '21 06:12 hasnainusti

Hi guys, I just submit a new beta version 3.4.0-beta.1 and give me your giveback. I couldn't replicate this issue, but could relate with the bugfix that prevent to remove markers. Also, please use the same markerId for new position updates, this is the way the Animarker keep the tracking of delta position (from-to).

gauris26 avatar Jul 24 '22 00:07 gauris26

Any updates, i am still facing this

gauravmehta13 avatar Feb 09 '23 13:02 gauravmehta13

@gauris26 it would be great if you can check this

gauravmehta13 avatar Feb 09 '23 13:02 gauravmehta13