Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was 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

Description

@cammace

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

Activity

  1. cammace commented on Jul 6, 2017

    @cammace
    ContributorAuthor

    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.

  2. cammace commented on Jul 6, 2017

    @cammace
    ContributorAuthor

    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

  3. cammace commented on Jul 6, 2017

    @cammace
    ContributorAuthor

    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

  4. cammace commented on Jul 6, 2017

    @cammace
    ContributorAuthor
  5. huunam118 commented on Jul 20, 2017

    @huunam118

    @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. :(

  6. tobrun commented on Jul 20, 2017

    @tobrun
    Member

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

  7. huunam118 commented on Jul 27, 2017

    @huunam118

    @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.

  8. tobrun commented on Sep 27, 2017

    @tobrun
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AndroidMapbox Maps SDK for Android

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions