You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
onMapChanged() called repeatedly when enabling MyLocation #3207
It gets about 100 calls per second, a sequence of WILL_START_RENDERING_FRAME followed by DID_FINISH_RENDERING_FRAME_FULLY_RENDERED. So that's 8,10,8,10...
And this happens when I'm not touching the screen. And the map is not updating because of the MyLocation blue dot, since onMyLocationChange(Location location) gets called at a very reasonable rate (3-4 calls at the beginning).
I'm using 2.4.0-SNAPSHOT, running on Nexus 6 (5.1.1). But my main issue is running the app on a Sony Xperia M4 Aqua (5.0), where the app crashes very frequently with Renderer issues.
OpenGLRenderer﹕ Path too large to be rendered into a texture
One more note about onMapChanged(), the call sequence stops if you pan MyLocation out of the map (with its accuracy circle). If not, the sequence never stops.
I've been struggling for a while with the OpenGLRenderer crash issue on the Xperia M4, so the onMapChanged() issue is just my latest guess!
It doesn't crash on Nexus 6, HTC One Mini or Galaxy S3.
It doesn't crash without enabling MyLocation
Happens mainly when starting or resuming the app. If it doesn't crash at the beginning, it usually runs fine.
Regardless if GPS high accuracy is enabled or disabled.
I have also tried delaying setMyLocationEnabled(true) till after onMapChanged( DID_FINISH_LOADING_MAP ) but it still crashes
And there it was: the compass arrow keeps constantly spinning around. Mapbox doesn't seem to find MyBearing, while it looks ok in google maps (no calibration request). I then tried to explicitly disable the compass bearing
@mudar
Thank you reaching out and reporting these problems.
Too many updates:
The UserLocationView is a basic Android View versus our MapView which is GL based.
We need to keep both the View location and GL elements in sync, this will probably be the cause of these updates. Will have to look into it where this is happening and if we can optimise this.
Spinning UserLocationView:
I recently noticed the spinning, at the time of implementing this was not an issue.. will have to dive into the commit history to find out where that problem is coming from. Will create a separate issue for that.
Activity
mudar commentedon Dec 7, 2015
simplified log, with 2 long sequences of about 100 calls per second.
Edited: attached instead of inline.
log.txt
mudar commentedon Dec 7, 2015
One more note about
onMapChanged(), the call sequence stops if you pan MyLocation out of the map (with its accuracy circle). If not, the sequence never stops.I've been struggling for a while with the OpenGLRenderer crash issue on the Xperia M4, so the
onMapChanged()issue is just my latest guess!setMyLocationEnabled(true)till afteronMapChanged( DID_FINISH_LOADING_MAP )but it still crashesalso attached is a
debug_activeoutput. Please let me know if I could help with any tests or additional information.debug.txt
mudar commentedon Dec 9, 2015
The
onMapChanged()issue is very probably related to ticket #2049I've replaced these lines
by the following, to see if the issue is related to the comapss
And there it was: the compass arrow keeps constantly spinning around. Mapbox doesn't seem to find MyBearing, while it looks ok in google maps (no calibration request). I then tried to explicitly disable the compass bearing
but the calls to
onMapChanged()keep coming.Does this make any sense?
tobrun commentedon Dec 9, 2015
@mudar
Thank you reaching out and reporting these problems.
Too many updates:
The
UserLocationViewis a basic Android View versus our MapView which is GL based.We need to keep both the View location and GL elements in sync, this will probably be the cause of these updates. Will have to look into it where this is happening and if we can optimise this.
Spinning UserLocationView:
I recently noticed the spinning, at the time of implementing this was not an issue.. will have to dive into the commit history to find out where that problem is coming from. Will create a separate issue for that.
[android] #3240 - Reimplemented compass algorithm for compass bearing…
mudar commentedon Jan 4, 2016
Closing issue, seems fixed in version 3.1.0, with
vMap.setMyBearingTrackingMode(MyBearingTracking.NONE)thanks!