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.

Using moveCamera with LatLngBounds issues #9322

Closed

Description

@kfadli

Hi, i want to update mapbox library to 5.1.0-beta.5 and i encounter issue when i try to use LatLngBounds.

the stacktrace:

`FATAL EXCEPTION: main

java.lang.NoSuchFieldError: no "D" field "mLatSouth" in class "Lcom/mapbox/mapboxsdk/geometry/LatLngBounds;" or its superclasses
at com.mapbox.mapboxsdk.maps.NativeMapView.nativeGetCameraForLatLngBounds(Native Method)
at com.mapbox.mapboxsdk.maps.NativeMapView.getCameraForLatLngBounds(NativeMapView.java:326)
at com.mapbox.mapboxsdk.maps.MapboxMap.getCameraForLatLngBounds(MapboxMap.java:1600)
at com.mapbox.mapboxsdk.camera.CameraUpdateFactory$CameraBoundsUpdate.getCameraPosition(CameraUpdateFactory.java:221)
at com.mapbox.mapboxsdk.maps.Transform.moveCamera(Transform.java:95)
at com.mapbox.mapboxsdk.maps.MapboxMap$1.run(MapboxMap.java:653)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6121)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

**Platform: Nexus 5X (Android 7.1.2)
**Mapbox SDK version:5.1.0-beta.5

Steps to trigger behavior

LatLngBounds bounds = new LatLngBounds.Builder()
                        .include(new LatLng(48.8589506,2.2773457))
                        .include(new LatLng(47.2383171,-1.6309316))
                        .build();

this.map.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 0));

The same code works on Mapbox 5.0.2

Activity

  1. added
    Android
    on Jun 21, 2017
  2. added this to the android-v5.1.0 milestone on Jun 21, 2017
  3. tobrun commented on Jun 21, 2017

    @tobrun
    Member

    Thank you for testing out the latest beta release. It seems the java part of LatLngBounds was updated but not the related c++ code. Will fix this up and add a test case to prevent future regressions. Thanks again for the report!

  4. tobrun commented on Jun 21, 2017

    @tobrun
    Member

    Resolved with #9324

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

    Android

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions