Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

MarkerView scroll when scroll,zoom map. Can not scroll, zoom map in Sony device #395

Closed
PhanVanLinh opened this issue Jul 4, 2017 · 5 comments

Comments

@PhanVanLinh
Copy link

PhanVanLinh commented Jul 4, 2017

ezgif-2-1982ceb7af

Here is my demo code

mapView.onCreate(savedInstanceState);
mapView.getMapAsync(new OnMapReadyCallback() {
    @Override
    public void onMapReady(MapboxMap mapboxMap) {
        Toast.makeText(SecondActivity.this, "ready", Toast.LENGTH_SHORT).show();

        mapboxMap.animateCamera(
                CameraUpdateFactory.newLatLngZoom(new LatLng(35.50, 139.125), 6));

        mapboxMap.addMarker(new MarkerViewOptions().position(new LatLng(35.75, 139.125))
                .title("Marker")
                .snippet("."));

        mapboxMap.addMarker(new MarkerViewOptions().position(new LatLng(35.25, 139.125))
                .title("MarkerView")
                .snippet("."));

        mapboxMap.addMarker(new MarkerViewOptions().position(new LatLng(35.25, 139.545))
                .title("MarkerView")
                .snippet("."));

        mapboxMap.addMarker(new MarkerViewOptions().position(new LatLng(35.75, 139.545))
                .title("MarkerView")
                .snippet("."));
    }
});

Device Sony
Model: SO-03H
Android version: 5.1.1
Baseband version: 8994-FAAAANAZQ-00029-06
Kernel version: 3.10.49-perf-g9468d07

I have test and it happened on both MapBox 4x and 5x

@cammace
Copy link
Contributor

cammace commented Jul 5, 2017

Thanks for the snippet and device information. We've seen this issue before on a select number of devices but never have been able to reproduce it. In this case, it looks like you are just using the default marker view. In that case you would be better off using MarkerOptions() rather than MarkerViewOptions() to create the marker on the map.

@PhanVanLinh
Copy link
Author

@cammace Thank you for your suggestion. In this Sony device, the polyline also have problem (some time it not visible). And also without Marker, MarkerView and Polyline, the map still have bug when scroll, zoom in, zoom out. I know it hard for MapBox because you can not reproduce it but if possible can you give me some suggestion to me for checking inside MapBox code to figure the problem.
This bug not happened with MapBox 2.7

@PhanVanLinh
Copy link
Author

PhanVanLinh commented Jul 6, 2017

Here is @mapchange log when start a MapView

mapView.addOnMapChangedListener(new MapView.OnMapChangedListener() {
            public void onMapChanged(int change) {
                        Log.i("Linh", ""+change);
            }
}

Sony devices
11,8,9,15,1,2,8,9,4,8,9,8,9,8,9,8,9,8,9,8,9,8,10,13,6,8,10

Normal working devices
11,8,9,15,1,2,8,9,2,8,9,2,8,9,2,8,9,2,8,9,2,8,9,2,8,9,2,8,9,2,8,9,2,8,9,2,8,9,2,8,9,4,8,9,8,9,8,9,8,9,8,9,8,9,8,10,13,6,8,10,0,3,0,3,8,10,0,3,0,3,8,10,0,3,8,10,8,10,0

I notice that in Sony devices, REGION_WILL_CHANGE (0) never return

@cammace
Copy link
Contributor

cammace commented Jul 6, 2017

I've moved this discussion over to mapbox-gl-native, Please continue the conversation over there.

mapbox/mapbox-gl-native#9441

@cammace cammace closed this as completed Jul 6, 2017
@PhanVanLinh
Copy link
Author

@cammace Thank you so much

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants