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.

Integrate MapboxMapOptions #4076

Closed

Description

@tobrun

MapboxMapSettings is required for parity with Google Maps SDK. It is used as a builder for MapboxMap and is used in conjunction with MapFragment and SupportMapFragment.

Activity

  1. added
    Android
    on Feb 23, 2016
  2. added this to the android-v4.0.0 milestone on Feb 23, 2016
  3. tobrun commented on Mar 8, 2016

    @tobrun
    MemberAuthor

    Since this feature is part of public API and is needed for a good integration with Fragments (we are now forcing our users to load 1 default style + 1 user provided style). Going to move it back to 4.0.0 and integrate it. Going to backup my integration with unit test for a safe landing.

  4. tobrun commented on Mar 8, 2016

    @tobrun
    MemberAuthor

    Another reason is the removal of ApiAccess class and moving it down to the test application!
    Removing such a class can only be done with major releases, this is imo a bigger requirement than above.

  5. changed the title [-]Integrate MapboxMapSettings[/-] [+]Integrate MapboxMapOptions[/+] on Mar 9, 2016
  6. added a commit that references this issue on Mar 9, 2016
  7. added a commit that references this issue on Mar 9, 2016
  8. mttpl commented on Mar 22, 2016

    @mttpl

    Where can I find some documentation how to use MapboxMapOptions and how to change it?

  9. tobrun commented on Mar 22, 2016

    @tobrun
    MemberAuthor

    @mttpi

    We are working on some guides/examples to support this.
    But here is some info to work with:

    Defines configuration MapboxMapMapOptions for a MapboxMap. These options can be used when adding a
    map to your application programmatically (as opposed to via XML). If you are using a MapFragment,
    you can pass these options in using the static factory method newInstance(MapboxMapOptions).
    If you are using a MapView, you can pass these options in using the constructor
    MapView(Context, MapboxMapOptions). If you add a map using XML, then you can apply these options
    using custom XML tags.

    With that you can config:

            cameraPosition = in.readParcelable(CameraPosition.class.getClassLoader());
            debugActive = in.readByte() != 0;
    
            compassEnabled = in.readByte() != 0;
            compassGravity = in.readInt();
            compassMargins = in.createIntArray();
    
            logoEnabled = in.readByte() != 0;
            logoGravity = in.readInt();
            logoMargins = in.createIntArray();
    
            attributionEnabled = in.readByte() != 0;
            attributionGravity = in.readInt();
            attributionMargins = in.createIntArray();
    
            minZoom = in.readFloat();
            maxZoom = in.readFloat();
    
            rotateGesturesEnabled = in.readByte() != 0;
            scrollGesturesEnabled = in.readByte() != 0;
            tiltGesturesEnabled = in.readByte() != 0;
            zoomControlsEnabled = in.readByte() != 0;
            zoomGesturesEnabled = in.readByte() != 0;
    
            locationEnabled = in.readByte() != 0;
    
            style = in.readString();
            accessToken = in.readString();

    reach out if you need more info

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

Metadata

Metadata

Assignees

Labels

Androidfeature

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions