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

Feature in Map not draggable and callback added using MapLibreMController.onFeatureDrag.add() is never called #463

Open
pamtbaau opened this issue Jun 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@pamtbaau
Copy link

Platforms

android

Version of flutter maplibre_gl

0.19.0+2

Bug Description

  • The Feature added to the map cannot be dragged.
  • When add a callback using MapLibreMController.onFeatureDrag.add(callback), the callback never gets called.

Steps to Reproduce

Using 'layer.dart' of Example:

  • Add callback:
    void _onMapCreated(MapLibreMapController controller) {
      this.controller = controller;
    
      controller.onFeatureTapped.add(onFeatureTap);
      controller.onFeatureDrag.add(onFeatureDrag);
    }
    
  • Define callback:
    void onFeatureDrag(
      dynamic featureId, {
      required LatLng current,
      required LatLng delta,
      required DragEventType eventType,
      required LatLng origin,
      required Point<double> point,
    }) {
      print('Feature with id: $featureId is being called');
    }
    

Expected Results

I would expect:

  • The feature in the Map to be draggable
  • The callback to be called.

Actual Results

  • The feature in the Map cannot be dragged
  • The callback is never called

Code Sample

See 'Steps to Reproduce'

@pamtbaau pamtbaau added the bug Something isn't working label Jun 11, 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