tlserver / flutter_map_location_marker

A flutter map plugin for displaying device current location.
https://pub.dev/packages/flutter_map_location_marker
BSD 3-Clause "New" or "Revised" License
97 stars 81 forks source link

Custom icon does not rotate with map #24

Closed basvdijk closed 2 years ago

basvdijk commented 2 years ago

I am using a custom marker to show on my location:

  LocationMarkerLayerOptions(
    marker: const DefaultLocationMarker(
      color: Colors.blue,
      child: Icon(
        Icons.navigation,
        color: Colors.white,
      ),
    ),
    markerSize: const Size(40, 40),
    markerAnimationDuration: const Duration(
        milliseconds: 100),
  )

When I rotate the map with the map controller, the custom Icon stays with the same orientation. It looks like the icon rotates with the map instead of pointing to the direction I am heading.

screenshot

tlserver commented 2 years ago

Um, it is expected behavior. The marker is not for displaying direction.

basvdijk commented 2 years ago

Um, it is expected behavior. The marker is not for displaying direction.

Any thoughts on how I can make it stay pointing to the top independent of the map being rotating?

tlserver commented 2 years ago

Not that easy in current version, I will update later and adding support to this usage.

basvdijk commented 2 years ago

Not that easy in current version, I will update later and adding support to this usage.

Would be really appreciated. Makes it a lot clearer to the user where they are driving to. Thanks for your effort for creating and maintaining this plugin!

tlserver commented 2 years ago

I am closing this because version 3.1.0 is available now.