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] <title>updateAcquireFence: Did not find frame #519

Open
YuneshShrestha opened this issue Nov 4, 2024 · 0 comments
Open

[BUG] <title>updateAcquireFence: Did not find frame #519

YuneshShrestha opened this issue Nov 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@YuneshShrestha
Copy link

Platforms

android

Version of flutter maplibre_gl

^0.20.0

Bug Description

image

"updateAcquireFence: Did not find frame" continues logging but stops logging if I don't use MapLibreMap.

Steps to Reproduce

  1. Add MapLibre package
  2. Using it:
MapLibreMap(
          logoViewMargins: const Point(-50, -50),
          onMapCreated: (MapLibreMapController controller) async {
            if (!mapController.libreMapController.isCompleted) {
              mapController.libreMapController.complete(controller);
            }
          },
          onCameraIdle: () {
            // Check if the map controller is available and if we have a valid starting position
            if (!(mapController.fromLatLng.value != null &&
                mapController.markers.isEmpty)) {
              return;
            }

            if (mapController.libreMapController.isCompleted) {
              mapController.libreMapController.future.then((controller) {
                final currentCameraPosition = controller.cameraPosition;

                // Only execute if the camera position has changed
                if (currentCameraPosition != null) {
                  final newLatLng = currentCameraPosition.target;
                  if (lastMapPosition == null ||
                      newLatLng.latitude != lastMapPosition?.latitude ||
                      newLatLng.longitude != lastMapPosition?.longitude) {
                    // Update the last known map position
                    lastMapPosition = newLatLng;

                    mapController.fromLocationCameraMove(newLatLng);
                    
                    // Get the location name from latlng
                    mapController
                        .getAddressFromLatLng(LatLng(
                      newLatLng.latitude,
                      newLatLng.longitude,
                    ))
                        .then((value) async {
                      debugPrint("Location Address: $value");
                    });
                  }
                }
              });
            }
          },
          trackCameraPosition: true,
          myLocationEnabled: true,
          myLocationTrackingMode: MyLocationTrackingMode.tracking,
          initialCameraPosition: const CameraPosition(
              target: LatLng(27.7192873, 85.3238007), zoom: 14.0),
          styleString:
              "https://api.baato.io/api/v1/styles/breeze?key=${AppConstants.baatoApi}",
        ),
    

Expected Results

"updateAcquireFence: Did not find frame" should not be displayed.

Actual Results

"updateAcquireFence: Did not find frame" should not be displayed.

Code Sample

MapLibreMap(
          logoViewMargins: const Point(-50, -50),
          onMapCreated: (MapLibreMapController controller) async {
            if (!mapController.libreMapController.isCompleted) {
              mapController.libreMapController.complete(controller);
            }
          },
          onCameraIdle: () {
            // Check if the map controller is available and if we have a valid starting position
            if (!(mapController.fromLatLng.value != null &&
                mapController.markers.isEmpty)) {
              return;
            }

            if (mapController.libreMapController.isCompleted) {
              mapController.libreMapController.future.then((controller) {
                final currentCameraPosition = controller.cameraPosition;

                // Only execute if the camera position has changed
                if (currentCameraPosition != null) {
                  final newLatLng = currentCameraPosition.target;
                  if (lastMapPosition == null ||
                      newLatLng.latitude != lastMapPosition?.latitude ||
                      newLatLng.longitude != lastMapPosition?.longitude) {
                    // Update the last known map position
                    lastMapPosition = newLatLng;

                    mapController.fromLocationCameraMove(newLatLng);
                    
                    // Get the location name from latlng
                    mapController
                        .getAddressFromLatLng(LatLng(
                      newLatLng.latitude,
                      newLatLng.longitude,
                    ))
                        .then((value) async {
                      debugPrint("Location Address: $value");
                    });
                  }
                }
              });
            }
          },
          trackCameraPosition: true,
          myLocationEnabled: true,
          myLocationTrackingMode: MyLocationTrackingMode.tracking,
          initialCameraPosition: const CameraPosition(
              target: LatLng(27.7192873, 85.3238007), zoom: 14.0),
          styleString:
              "https://api.baato.io/api/v1/styles/breeze?key=${AppConstants.baatoApi}",
        ),
     
@YuneshShrestha YuneshShrestha added the bug Something isn't working label Nov 4, 2024
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

1 participant