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

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

Closed
cammace opened this issue Jul 6, 2017 · 8 comments
Labels
Android Mapbox Maps SDK for Android

Comments

@cammace
Copy link
Contributor

cammace commented Jul 6, 2017

Original post can be found in the Mapbox Android Demo app by @PhanVanLinh

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 cammace added the Android Mapbox Maps SDK for Android label Jul 6, 2017
@cammace
Copy link
Contributor Author

cammace commented Jul 6, 2017

Original posted by @cammace

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.

@cammace
Copy link
Contributor Author

cammace commented Jul 6, 2017

Original post by @PhanVanLinh

@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

@cammace
Copy link
Contributor Author

cammace commented Jul 6, 2017

Original post by @PhanVanLinh

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 Author

cammace commented Jul 6, 2017

cc @tobrun @Guardiola31337

@huunam118
Copy link

@cammace @tobrun @Guardiola31337 : Any updated status on this issue? I got android Mapbox demo from GooglePlay and any map just zoomed-in 3 times before getting freeze. :(

@tobrun
Copy link
Member

tobrun commented Jul 20, 2017

@huunam118, which device are you using for testing this?

@huunam118
Copy link

huunam118 commented Jul 27, 2017

@tobrun Sorry for missing info, the device is same as @PhanVanLinh SO-03H .
Please help to review @GianhTran comment #8030 #8030 (comment). We temporary fix it, but please suggest us about performance after this change.

@tobrun
Copy link
Member

tobrun commented Sep 27, 2017

MarkerView is going to be deprecated with #9782. We are no longer maintaining this API and will remove it in future versions of the SDK. As noted in the deprecation message. We are advising users to leverage SymbolLayer instead (you can use the sample code in #9782 to convert Android SDK views to an Image to be used as a Symbol). While we no longer maintain the API we are happy to accept any PRs on it.

@tobrun tobrun closed this as completed Sep 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

No branches or pull requests

3 participants