question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Catch a user-triggered drag event on both IOS and Android

See original GitHub issue

Hi, I’m trying to implement a “reload pins on drag” system, but the only event I can use for both IOS and android is CAMERA_CHANGE, which is triggered at the end of the move, and makes any non-user camera changes reloading twice.

Any solution to fix this ? I saw I could use MAP_WILL_MOVE for IOS which works fine. Any way to get any event on android ?

I saw that the beta alpha implements CAMERA_MOVE_START MAP_CHANGE_START but it’s too unstable to use right now. Thanks !

      map.on(plugin.google.maps.event.CAMERA_CHANGE, function(){
        if (camera_active === false)
          // needs to reload data, should be triggered by user input 
         // triggers AFTER camera_active is set back to false
      });

    var updateMap = function(results){ // camera moves triggered by non-user input
        camera_active = true;
        map.moveCamera({
          'target' : 
        }, function(){
          camera_active = false;
        });
      }

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:23 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
yannguilloncommented, Nov 18, 2016

I tried it a while ago and I see you updated the doc so I’ll give it another try! I don’t use the wrapper, just a ionic service including this lib Amazing work BTW

0reactions
wf9a5m75commented, Jan 2, 2017

The plugin must delay the position because the map view is not a html element. There is no way to resolve it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Detect a finger swipe through JavaScript on the iPhone and ...
I wanted to detect left and right swipe only, but trigger the action only when the touch event ends, so ...
Read more >
Drag and drop - Android Developers
With drag and drop, users can copy or move text, images, objects—any ... A View receives drag events with either a drag event...
Read more >
Understanding Vue.js touch events for Android and iOS
This article will focus on the most common ones, which are the events users perform regularly; tap , drag , swipe , and...
Read more >
HTMLElement: dragstart event - Web APIs | MDN
The dragstart event is fired when the user starts dragging an element or text selection.
Read more >
Android Drag and Drop Tutorial: Moving Views and Data
When the user releases the drag shadow over a view that's registered for drag events, the system dispatches a drag event with action...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found