mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.38k stars 1.32k forks source link

FocalPoint MyLocationView with padding #8415

Closed tobrun closed 7 years ago

tobrun commented 7 years ago

ezgif com-video-to-gif 20

giperwlad commented 7 years ago

I have a similar problem. When you set padding and change tilt (through gesture or animation) location moves to the wrong position.

     Double topPadding = (mapboxMap.getHeight() * 0.80);
     mapboxMap.getMyLocationViewSettings().setPadding(0, topPadding.intValue(), 0, 0);
     mapboxMap.getUiSettings().setFocalPoint(new PointF(mapView.getWidth() / 2, topPadding.floatValue()));

SDK version 5.1.0-beta.4

videotogif_2017 07 14_10 24 06

tobrun commented 7 years ago

@giperwlad that is indeed the same issue, note that we will be deprecating MyLocationView in upcoming releases and will be replacing it with https://github.com/mapbox/mapbox-plugins-android/pull/22. This implementation is build on runtime styling and doesn't have these transfrorm/synchronisation issues.

tobrun commented 7 years ago

MyLocationView is going to be replaced with LocationLayer. Feel free to recreate this ticket in that repo.