Giter Club home page Giter Club logo

Comments (3)

vyskocil avatar vyskocil commented on July 26, 2024

I remember there were questions about performance issues if there is a lot of markers on the map. But if the loss is acceptable it would be great to have views instead of layers as touch event handling on makers is now very awkward !

from route-me.

michaeltyson avatar michaeltyson commented on July 26, 2024

We'd definitely need to incorporate some kind of marker view reuse, I'd say, if we were going to use UIViews - the same way MapKit does it, I guess.

That said, I'd be interested in finding out what the end goal is, here - what kind of interaction are we after, with markers?

For marker dragging, the current implementation is totally broken, and wouldn't be fixed by making markers UIViews - we need to track drag operations from the superview, so that when fast movements result in the touch leaving the bounds of the dragged marker, the drag doesn't end. I've implemented this in an RMMapView subclass in my own project, and it works fine, with CALayer markers.

For marker selection, I'd imagine the better way to implement it would be also based in the superview - determine which markers are under the touch, and select the one that's closest. A UIView wouldn't help there, either. (In fact, I re-implemented this in MapKit, because MapKit doesn't do it right either - and I implemented it in a superview of the MKMapView)

For callout views, which is the other use I can think of for marker interaction, I just create a subview of RMMapView which I keep anchored to the marker via the map move and marker move delegate methods.

from route-me.

michaeltyson avatar michaeltyson commented on July 26, 2024

PS some more discussion on this issue here - discussion didn't get copied over with the issue tracker migration, unfortunately.

from route-me.

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.