Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Disappearing MarkerViews on phones with unusual aspect ratio #9550

Closed
LukasPaczos opened this issue Jul 19, 2017 · 2 comments
Closed

Disappearing MarkerViews on phones with unusual aspect ratio #9550

LukasPaczos opened this issue Jul 19, 2017 · 2 comments
Labels
Android Mapbox Maps SDK for Android Core The cross-platform C++ core, aka mbgl

Comments

@LukasPaczos
Copy link
Member

marker
marker2

Reproducible on Samsung Galaxy S8+. I wasn't able to reproduce it on any phone with 16:9.

  • To make a marker disappear you have to tilt camera more than 55 degrees and find specific zoom level.
  • It unfortunately isn't consistent. When there are many different markers visible at the same time some might disappear and others won't.
  • Markers seem to start disappearing below center of the screen.

Problem originates in native code because markers are not made invisible, they are actually not returned at all in NativeMapView#queryPointAnnotations() (invoked in AnnotationManager#getMarkersInRect()).

Marker:

mapboxMap.addMarker(new MarkerViewOptions().position(new LatLng(51.015,16)));

Camera position:

//marker visible
D/onCameraIdle: Target: LatLng [latitude=51.01496666711435, longitude=16.000138947282153, altitude=0.0], Zoom:18.214754127766252, Bearing:107.13901185546955, Tilt:59.99999999999999

//marker invisible
D/onCameraIdle: Target: LatLng [latitude=51.014883108383664, longitude=16.000531546911475, altitude=0.0], Zoom:18.214754127766252, Bearing:107.13901185546955, Tilt:59.99999999999999
@fabian-guerra fabian-guerra added Android Mapbox Maps SDK for Android Core The cross-platform C++ core, aka mbgl labels Jul 19, 2017
@tobrun
Copy link
Member

tobrun commented Jul 24, 2017

Problem originates in native code because markers are not made invisible, they are actually not returned at all in NativeMapView#queryPointAnnotations() (invoked in AnnotationManager#getMarkersInRect()).

This is the same issue as with MarkerView animations (noticed this myself in #8799 ). I would advice you to look into migrating to SymbolLayer instead of MarkerViews. Going to close this as a duplicate, thank you @LukasPaczos for testing!

@tobrun tobrun closed this as completed Jul 24, 2017
@LukasPaczos
Copy link
Member Author

Alright, thanks a lot for looking into this @tobrun! I'm looking forward to full rollout of location layer as well as #9365 to depracate all those Android views.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android Core The cross-platform C++ core, aka mbgl
Projects
None yet
Development

No branches or pull requests

3 participants