Giter Site home page Giter Site logo

Comments (10)

neilboyd avatar neilboyd commented on July 4, 2024

The change to onLayout is a bit out of date because of the recent projection changes.

All the code in scrollTo is also missing.

Please could you supply a patch to MapView with just the changes required to fix this issue.

from osmdroid.

MKergall avatar MKergall commented on July 4, 2024

Effectively, the change was obsolete with those changes.
I updated the fix according to osmdroid 4.2 changes.

Here is the patched MapView: https://drive.google.com/file/d/0B_8VOmRyW664WGotcmRLbjV3TDA/edit?usp=sharing

See sections marked with "ADDED" / "END".

  • EDIT on 30/05 -
    Hi Neil,
    Any chance to have this fixed soon?
    I see that you are busy with Xamarin project, but integrating the patch should be pretty straightforward.

from osmdroid.

MKergall avatar MKergall commented on July 4, 2024

Neil, Marc,
Any chance to have this fix integrated in the next version of osmdroid?
(currently, bubbles are unusable when the map is rotated - this is a big drawback)

from osmdroid.

kurtzmarc avatar kurtzmarc commented on July 4, 2024

Any tests on how calling onLayout on every scroll affects performance? That is the only thing that gives me pause. Actually - how are we getting away with not having to do that now?

from osmdroid.

kurtzmarc avatar kurtzmarc commented on July 4, 2024

Okay - we don't have to do that now because we use mercator projection (regular canvas) coordinates to set the position. I don't think calling onLayout will affect performance that much, but I'd like to confirm that before committing. This is an important patch and we should definitely fix this long-standing issue.

from osmdroid.

kurtzmarc avatar kurtzmarc commented on July 4, 2024

... and perhaps we should only call onLayout if the map orientation is != 0 || 180

from osmdroid.

MKergall avatar MKergall commented on July 4, 2024

onLayout is only about positionning visible child views. It does nothing else.

Effectively, in scrollTo, we could check map orientation != 0 before calling onLayout.
For != 180, I'm not 100% sure...

from osmdroid.

kurtzmarc avatar kurtzmarc commented on July 4, 2024

Let me know if that works for you!

from osmdroid.

MKergall avatar MKergall commented on July 4, 2024

It works!

from osmdroid.

kurtzmarc avatar kurtzmarc commented on July 4, 2024

Excellent! I will close this issue.

from osmdroid.

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.