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.
Loop to add and remove markers,markers are not visible #4778
Hi there, I'm facing similiar issues for a while but thought it was related to the poor performance of my current phone (Sony Xperie P, Android 4.4.2 CM). My issue is not exactly the same but for me some certain markers are also not drawn after some iterations. It is possible that my experiences are a new issue but i want to share my experiences here first.
So, this occurs on 4.0.0-beta1 and 2 (didn't use the final because of the Marker issue of removeAnnotations()) and I have just tried the 4.1.0 Snapshot:
For some amount of time everything is working fine when I clear some annotations using removeAnnotations(List) and creating new annotation lists as visualization attribute of a certain class. So unlike the OP, its running fine for some minutes in the normal onLocationChangedEvent. However, at a random point some (new, I do not store and re-add them like OP) Markers are not added anymore. Part of the annotations as visuals for my class are among other things two Markers. All markers that use Icons that are set up at the MainActivity's onCreate and set of a class 'Landmark' are always reused for the visualizations and do still get added to the map. However, those that are newly created which means getting the PNG file from Resources and creating an Icon via IconFactory are not. I had the same behaviour when I did the same approach for a Marker that displays the current user position. However, after making it using an Icon that is set up in onCreate this position marker remains being drawn, while those others are not.
In summary, it does not seem to be related to the removing and adding of markers, but rather to the newly creating of Icons.
My posted experiences are related to #4189 so it'll be fixed within #4207. However, it does not explain the issues during runtime which is also part of #4189 that @tobrun has closed. The OP here does not create new bitmaps in every iteration.
Activity
Schumi09 commentedon Apr 21, 2016
Hi there, I'm facing similiar issues for a while but thought it was related to the poor performance of my current phone (Sony Xperie P, Android 4.4.2 CM). My issue is not exactly the same but for me some certain markers are also not drawn after some iterations. It is possible that my experiences are a new issue but i want to share my experiences here first.
So, this occurs on 4.0.0-beta1 and 2 (didn't use the final because of the Marker issue of removeAnnotations()) and I have just tried the 4.1.0 Snapshot:
For some amount of time everything is working fine when I clear some annotations using removeAnnotations(List) and creating new annotation lists as visualization attribute of a certain class. So unlike the OP, its running fine for some minutes in the normal onLocationChangedEvent. However, at a random point some (new, I do not store and re-add them like OP) Markers are not added anymore. Part of the annotations as visuals for my class are among other things two Markers. All markers that use Icons that are set up at the MainActivity's onCreate and set of a class 'Landmark' are always reused for the visualizations and do still get added to the map. However, those that are newly created which means getting the PNG file from Resources and creating an Icon via IconFactory are not. I had the same behaviour when I did the same approach for a Marker that displays the current user position. However, after making it using an Icon that is set up in onCreate this position marker remains being drawn, while those others are not.
In summary, it does not seem to be related to the removing and adding of markers, but rather to the newly creating of Icons.
My project code is located at https://github.com/Schumi09/WayTo-Navigation (Let me know if you need a more detailed description of my experiences)
Schumi09 commentedon May 11, 2016
My posted experiences are related to #4189 so it'll be fixed within #4207. However, it does not explain the issues during runtime which is also part of #4189 that @tobrun has closed. The OP here does not create new bitmaps in every iteration.
tobrun commentedon Jun 21, 2016
This should be resolved with the introduction of View Markers in
4.1.0. Feel free to reach out to ask more questions! Closing as non actionable.