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

adding functionality for OnDraggingMarker #37

Closed
jaimeglez opened this issue Jun 1, 2016 · 1 comment
Closed

adding functionality for OnDraggingMarker #37

jaimeglez opened this issue Jun 1, 2016 · 1 comment

Comments

@jaimeglez
Copy link

Hi all,

I just add to my app the OnMarkerDragListener for android, it could be nice to add to your plugin

this is what I did for android

gMap.setOnMarkerDragListener(new com.google.android.gms.maps.GoogleMap.OnMarkerDragListener({
    onMarkerDrag: function(gmsMarker) {
      return this;
    },
    onMarkerDragEnd: function(gmsMarker) {
      callback(gmsMarker);
      return this;
    },
    onMarkerDragStart: function(gmsMarker) {
      return this;
    }
  }));

Now the thing is that I also want to implement this listener to IOS but I could figure out how to do that, I have been read and found how to make the instance of GMSMapViewDelegate:

  var MyMapViewDelegate = NSObject.extend({
    didEndDraggingMarker: function(map, marker, event) {
      console.log("did drag marker with event");
    }
  }, {
    protocols: [GMSMapViewDelegate]
  });

  var mapViewDelegate = MyMapViewDelegate.alloc().init();
  gMap.delegate = mapViewDelegate;

The listener is not working with this code, could you give a hand with this. Also once listener for IOS is working we could add to the list of support events such as markerSelect or cameraChanged

@dapriett
Copy link
Owner

dapriett commented Jun 2, 2016

Hey @jaimeglez - drag events should be good to go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants