Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] YandexMapController.moveCamera not working on static map #24

Open
4 of 6 tasks
vmeretin opened this issue Jun 3, 2024 · 2 comments
Open
4 of 6 tasks

[BUG] YandexMapController.moveCamera not working on static map #24

vmeretin opened this issue Jun 3, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@vmeretin
Copy link

vmeretin commented Jun 3, 2024

Expected behavior

Camera animating on new position

Actual behavior

Camera not animating on new position

Video/Screenshot

IMG_D11C256053C5-1

Details

Flutter version: 3.22.0

Dart version: 3.4.0

Platform: iOS only

Example of usage

class YandexMapsStaticWidget extends StatelessWidget {
  final double latitude;
  final double longitude;
  final VoidCallback onPressed;

  const YandexMapsStaticWidget({
    required this.latitude,
    required this.longitude,
    required this.onPressed,
  });

  @override
  Widget build(BuildContext context) => YandexMap(
        tiltGesturesEnabled: false,
        zoomGesturesEnabled: false,
        rotateGesturesEnabled: false,
        scrollGesturesEnabled: false,
        mapObjects: [
          PlacemarkMapObject(
            mapId: MapObjectId('$latitude, $longitude'),
            point: Point(
              latitude: latitude,
              longitude: longitude,
            ),
            icon: PlacemarkIcon.single(PlacemarkIconStyle(
              image: BitmapDescriptor.fromAssetImage('assets/icons/map_selected.png'),
            )),
            opacity: 1,
          ),
        ],
        onMapCreated: (yandexMapController) async {
          await yandexMapController.setMapStyle(YandexMapsConstants.style);
          await yandexMapController.moveCamera(
            CameraUpdate.newCameraPosition(CameraPosition(
              target: Point(
                latitude: latitude,
                longitude: longitude,
              ),
              zoom: MapConstants.initialStaticZoom,
            )),
            animation: const MapAnimation(duration: 0.1),
          );
        },
        onMapTap: (point) => onPressed(),
      );
}

What did you try to solve

null animation parameter in moveCamera method

Checklist for self-check

  • Added expected and actual behavior.
  • Added video or screenshot of bug.
  • Added isolated way to reproduce the bug. (unstable bug)
  • Specified Flutter, Dart version and platforms.
  • Attached error code and logs. (UI bug)
  • All unspecified fields in the Issue description are deleted.
@vmeretin vmeretin added the bug Something isn't working label Jun 3, 2024
Copy link

github-actions bot commented Jun 3, 2024

Link to Pyrus task

@selawik
Copy link

selawik commented Nov 18, 2024

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants