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.
Annotations not stable or disappear after loop #5019
@zhemora
To investigate this issue I created some sample code in 14e1207.
The code adds/removes markers to/from a map constantly every 1500ms.
Could you share some code how you are adding/removing these markers? or compare it with 14e1207? Could you try testing with the newer SNAPSHOT? (for this you need to invalidate gradle caches and do a gradle sync)
@zhemora a workaround for now is to manage the markers yourself. So instead of adding/removing them constantly. I would suggest updating the position by calling setPosition by iterating over the newly received data and comparing this with the old data.
Your example matches those observations I have described in the comments of #4778. It happens only if you create new icons for every iteration from resources. I guess if you change your example to make use of an Icon that you always reuse this issue won't appear. However, for my use case i need to create new icons for every itereation as i need to change alpha and orientation (depending of the location of an off screen object).
Thank you @Schumi09 for that remark. It's starting to come back to me and I'm guessing this is related to the limitation of our sprite atlas being 1024x1024. More information about this issue can be found in #3185. I'm going to do some tests around this to find the best way to handle this for now and will be closing this issue in favour of #3185. FWIW #3276 in combination with #4693 will make the use-case possible and will not limit us changing the marker.
Thank you @Schumi09 for that remark. It's starting to come back to me and I'm guessing this is related to the limitation of our sprite atlas being 1024x1024. More information about this issue can be found in #3185. I'm going to do some tests around this to find the best way to handle this for now and will be closing this issue in favour of #3185. FWIW #3276 in combination with #4693 will make the use-case possible and will not limit us changing the marker.
So as the the current state for the 4.1.0 snapshot brought the nice MarkerViews I have replaced the Marker in my project that caused this issue for me with a MarkerView. After several minutes I can still see the MarkerViews. I guess it is save to confirm that your work has fixed this indeed 👍
@Emeritus-DarranKelinske I would advice you to look into runtime styling. We are finalising this feature for the 4.2.0 release. These API supports the concept of SymbolLayer which is simaler to what Marker use in the low level API.
Activity
tobrun commentedon May 13, 2016
@zhemora could you verify it's the
4.1.0-SNAPSHOTdependency?The problem now is that there are multiple versions at this time:
And I need to be sure before looking into where the problem is originating from.
I just kicked of a build for the
4.1.0-SNAPSHOTso it reflects the latest state of master.[android] #5019 - constantly add remove markers
[android] #5019 - increased timing to match Toast timing
tobrun commentedon May 13, 2016
@zhemora
To investigate this issue I created some sample code in 14e1207.
The code adds/removes markers to/from a map constantly every 1500ms.
Could you share some code how you are adding/removing these markers? or compare it with 14e1207? Could you try testing with the newer SNAPSHOT? (for this you need to invalidate gradle caches and do a gradle sync)
tobrun commentedon May 13, 2016
@zhemora thank you for adding that information. Will try to reproduce.
tobrun commentedon May 17, 2016
@zhemora thank you for adding the code and GIF demonstrating the issue.
Going to reproduce locally and debug why the markers aren't reloaded.
tobrun commentedon May 17, 2016
No problems doing a couple of iterations -> 2399 id marker

Next iteration I'm seeing some markers not being added to the map -> 2999 id latest maker
Next iteration, no markers shown -> 3599 id latest marker
@1ec5 are you seeing the same on iOS? Any idea what the cause of this could be?
tobrun commentedon May 17, 2016
@zhemora a workaround for now is to manage the markers yourself. So instead of adding/removing them constantly. I would suggest updating the position by calling
setPositionby iterating over the newly received data and comparing this with the old data.[android] #5019 - loop add markers bug
Schumi09 commentedon May 17, 2016
Your example matches those observations I have described in the comments of #4778. It happens only if you create new icons for every iteration from resources. I guess if you change your example to make use of an Icon that you always reuse this issue won't appear. However, for my use case i need to create new icons for every itereation as i need to change alpha and orientation (depending of the location of an off screen object).
tobrun commentedon May 17, 2016
Thank you @Schumi09 for that remark. It's starting to come back to me and I'm guessing this is related to the limitation of our sprite atlas being 1024x1024. More information about this issue can be found in #3185. I'm going to do some tests around this to find the best way to handle this for now and will be closing this issue in favour of #3185. FWIW #3276 in combination with #4693 will make the use-case possible and will not limit us changing the marker.
afathman commentedon May 17, 2016
I have a similar issue on 4.0.0, removeAnnotations doesn't remove any custom markers.
tobrun commentedon May 17, 2016
@afathman that issue should be fixed with 4.0.1
afathman commentedon May 17, 2016
Ah, didn't notice the update. Thanks!
Schumi09 commentedon Jun 6, 2016
So as the the current state for the 4.1.0 snapshot brought the nice MarkerViews I have replaced the Marker in my project that caused this issue for me with a MarkerView. After several minutes I can still see the MarkerViews. I guess it is save to confirm that your work has fixed this indeed 👍
tobrun commentedon Jun 6, 2016
@Schumi09 thanks for validating, going to close this for now since we have the MarkerView workaround.
Emeritus-DarranKelinske commentedon Nov 25, 2016
Can you please re-open this? Even though there is a workaround the intended/expected functionality does not work.
dazza5000 commentedon Nov 26, 2016
Our current testing shows that switching to MarkerViews is a valid workaround.
tobrun commentedon Nov 26, 2016
@Emeritus-DarranKelinske I would advice you to look into runtime styling. We are finalising this feature for the 4.2.0 release. These API supports the concept of SymbolLayer which is simaler to what Marker use in the low level API.