user_location_plugin icon indicating copy to clipboard operation
user_location_plugin copied to clipboard

markerWidget not visible or range 0 error

Open MichalNemec opened this issue 4 years ago • 0 comments

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'main page'
  2. Click on 'FAB to show location'
  3. Scroll down to 'none'
  4. See error

Expected behavior A clear and concise description of what you expected to happen. click on fab, zoom to value specified in userLocationOptions. No zoom happens. Marker is not visible at all

Screenshots not needed

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Version 91.0.4472.77 (Official Build) (64-bit)

Smartphone (please complete the following information):

  • Device: Android emulator
  • OS: Android 10
  • Browser stock
  • Version 29 i believe

Additional context

userLocationOptions = UserLocationOptions(
      showHeading: true,
      context: context,
      mapController: mapController,
      markers: _userMarker, //is empty initialized above
      locationUpdateInBackground: true,
      onLocationUpdate: (LatLng pos, double? speed) =>
          _userPosition = pos, // print("onLocationUpdate ${pos.toString()}"),
      updateMapLocationOnPositionChange: false,
      showMoveToCurrentLocationFloatingActionButton: true,
      zoomToCurrentLocationOnLoad: false,
      fabBottom: 16.5,
      fabRight: 20,
      fabHeight: 55,
      fabWidth: 55,
      moveToCurrentLocationFloatingActionButton: new FloatingActionButton(
        child: const Icon(Icons.near_me),
        onPressed: onTapFAB,
      ),
      verbose: false,
      onTapFAB: onTapFAB,
      locationUpdateIntervalMs: 1000,
      defaultZoom: 16, //does not matter if i put 2 or 19 .. its still the same
    );

MichalNemec avatar Jun 08 '21 06:06 MichalNemec