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.

Bearing missing from XML #6482

Closed
Closed

Description

@cammace

When creating the Mapview in XML you can set the initial tilt, position, and zoom but there isn't an option for bearing/rotation.

cc: @tobrun

Activity

  1. added
    Android
    on Sep 27, 2016
  2. tobrun commented on Sep 27, 2016

    @tobrun
    Member

    Because it's called direction :trollface:

  3. tobrun commented on Sep 27, 2016

    @tobrun
    Member

    Feel free to (re)open this/an issue if you want to rename it, we have currently 3 names for same concept (mainly mixture of naming in core vs google parity vs legacy code). This would introduce a semver change.

  4. added this to the milestone on Sep 27, 2016
  5. added
    SEMVER-MAJOR
    on Sep 27, 2016
  6. tobrun commented on Nov 2, 2016

    @tobrun
    Member

    Noticed that we use the following:

    <!--Camera-->
    <attr name="mapbox_center_longitude" format="float" />
    <attr name="mapbox_center_latitude" format="float" />
    <attr name="mapbox_zoom" format="float" />
    <attr name="mapbox_direction" format="float" />
    <attr name="mapbox_tilt" format="float" />

    If we are breaking the atttribute mapbox_direction already, we should also look into renaming the other attrs to match the fields from CameraPosition class:

        /**
         * Direction that the camera is pointing in, in degrees clockwise from north.
         */
        public final double bearing;
    
        /**
         * The location that the camera is pointing at.
         */
        public final LatLng target;
    
        /**
         * The angle, in degrees, of the camera angle from the nadir (directly facing the Earth). See tilt(float) for details of restrictions on the range of values.
         */
        public final double tilt;
    
        /**
         * Zoom level near the center of the screen. See zoom(float) for the definition of the camera's zoom level.
         */
        public final double zoom;

    This means renaming mapbox_center_longitude to mapbox_target_longitude and mapbox_center_latitiude to mapbox_target_longitude.

  7. self-assigned this
    on Nov 3, 2016
  8. mariusboepple commented on Mar 20, 2017

    @mariusboepple

    Are you serious?! First, these are breaking changes - please mention this in the changelog next time! Second, now I have to spend half an hour on how you renamed the attributes to change them all, because we're using your maps in many places of our app, but maybe that's not the recommended use-case... Please at least provide some additional information how to migrate (I hope that was planned for the stable release)... And third: I don't think that is really how it should be designed for the long-term, attributes do/should not have to be prefixed in Android.

  9. tobrun commented on Mar 20, 2017

    @tobrun
    Member

    @mariusboepple

    On first: We follow semantic versioning, this allows us to only change the api on a major version bump. These changes are items we have been postponing for a long time since we were committed to the public api of 4.x. On second: We have a migration guide but it seems we need to look into improving the visibility of it. On third: when writing Android code for an aar it's recommend to prefix resources:

    you configure a "resource prefix" for your Android library (see the build system docs), in order to avoid accidental name clashes, Studio will flag all resources that do not conform to the given prefix, and it will also default newly suggested identifiers in the layout editor, create resource dialogs etc to identifiers which begin with the prefix.

    Apologies if the update has been a burden, thank you for reaching out and reporting this back to us!

  10. mariusboepple commented on Mar 20, 2017

    @mariusboepple

    Okay, thanks for the quick response. Nevertheless it would be nice if breaking changes are marked and the migration guide is linked in the changelog (because I'm checking the changelog and not if there's any guide in the wiki when I'm updating)...

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

Metadata

Metadata

Assignees

Labels

AndroidSEMVER-MAJOR

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions