cordova-plugin-googlemaps: Catch a user-triggered drag event on both IOS and Android

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;
        });
      }

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 23 (12 by maintainers)

Most upvoted comments

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