Git Product home page Git Product logo

Comments (5)

alexalexalex-s avatar alexalexalex-s commented on September 28, 2024 1

By just commenting out !isDragging you introduce a usability issue whereby dragging the map while the mouse is over a cluster icon will zoom in once you finish the drag, just like if you've clicked it.

Here is a simpler fix I've implemented which fixes the issue in Chrome and allows dragging to behave as expected. Remove the existing mousedown and mousemove events on this.div_ and replace with this:

google.maps.event.addDomListener(this.div_, 'mousedown', function () { google.maps.event.addListenerOnce(that.map_, "dragstart", function () { isDragging = true; }); isDragging = false; });

from js-marker-clusterer.

nawara28 avatar nawara28 commented on September 28, 2024 1

For IONIC users' sake I am adding my fixes.

In mobile there is no 'mousedown' or 'mousemove' event defined so I use 'dragstart', 'dragend' envent instead.

google.maps.event.addListenerOnce(that.map_, "dragstart", function () { isDragging = true; });
google.maps.event.addListenerOnce(that.map_, "dragend", function () { isDragging = false; });

This solves my marker-cluster-not-clicking problem in some devices.

from js-marker-clusterer.

jandrodev avatar jandrodev commented on September 28, 2024

Thanks man !!! I was going crazy with this. What he says fixes the problem.

from js-marker-clusterer.

RayofNogg avatar RayofNogg commented on September 28, 2024

I also had this problem and stevesuk's solution fixed the problem just short of me resorting to fits of violence. Thanks man!
alexanderschana's works too!
Thanks guys.

from js-marker-clusterer.

aesculus avatar aesculus commented on September 28, 2024

@alexalexalex-s

Thank you so much for this.

from js-marker-clusterer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.