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.

6.0.2 issue in controller.animateTo()

See original GitHub issue

Issue Type

[X ] Question [X ] Bug

Description and/or steps/code to reproduce the problem

I have a self written overlay whichs draw() method line 1 is an if ( shadow || map.isAnimating() ) return;.

Now when I send a controller.animateTo(), my overlay painted with v6.0.1 after animation target was reached. However with v.6.0.2-SNAPSHOT from right now the draw() method does not seem to get triggered after animation has finished. Consequently the overlay is not being drawn at all. Minimally touching and moving the map though triggers a correct overlay.draw().

I see no way to achieve a overlay draw after animation now.

Using controller.setCenter() instead of animateTo() works fine, so problem seems to come from the animation.

Environment

Found this behavior change on all 3 tested emulators.

If it’s a bug, version(s) of android this affects:

fully reproducible on 7.1.1, 8.1 very often reproducible on 6.0

Version of osmdroid the issue relates to:

6.0.2-SNAPSHOT

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:32

github_iconTop GitHub Comments

1reaction
spyhunter99commented, Jul 7, 2018

side note: whoever added/updated the Animate To sample did an awesome job! Fantastic idea. I’m using that demo, which does call animateTo and onScroll and onZoom events are both firing. What am I not understanding?

1reaction
monsieurtanukicommented, Jul 7, 2018

If I sum up:

  • a new feature was merged into osmdroid in 6.0.2 - MapController.animateTo with zoom AND geopoint at the same time
  • this new feature is not part of the initial IMapController and MapListener interfaces
  • somehow this new feature introduced unwanted side-effects regarding MapListener events
  • anyway MapListener cannot deal with zoom change and geopoint change at the same time
  • a workaround is to emulate the MapListener with zoom, geopoint and zoom+geopoint events using an Overlay with no display

Hence the questions:

  • should we create a new ScrollZoomEvent class extending MapEvent, and upgrade IMapController and MapListener? As they are interfaces, it won’t be harmless for apps already using the library
  • should we deprecate IMapController, MapListener, MapEvent, ScrollEvent and ZoomEvent, and recommend the use of Overlay instead?
Read more comments on GitHub >

github_iconTop Results From Across the Web

Ext.Progress | Ext JS 6.0.2 - Sencha Documentation
Summary. A simple progress bar widget. You are responsible for showing, updating (via setValue) and clearing the progress bar as needed from your...
Read more >
ScrollController animateTo() - flutter - Stack Overflow
I want the selected item in the horizontal listView to be centered, so I first calculate the position that should animate to (scroll...
Read more >
MapView (osmdroid-android 6.1.6 API) - javadoc.io
enables you to add a listener for when the map is ready to go. boolean, canZoomIn(). boolean, canZoomOut().
Read more >
Deprecated List
This class is no longer maintained and has various issues. Instead you should use the ... As of 6.0.2, use BitmapPool. ... Use...
Read more >
Building Dynamic Ajax Applications Using WebSphere ...
This edition applies to WebSphere Application Server Feature Pack for Web 2.0 for Version 6.0.2,. Version 6.1, and Community Edition Version 2.0. Note:...
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