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.

Document units for MyLocationViewSettings.setPadding() #6765

Closed

Description

@zugaldia

Currently, the documentation for MyLocationViewSettings.setPadding(int left, int top, int right, int bottom) says the following:

Set the MyLocationView padding.
Parameters:
left - the padding left of MyLocationView
top - the padding top of MyLocationView
right - the padding right of MyLocationView
bottom - the padding bottom of MyLocaionView

(also, note the typo in that last MyLocaionView).

The documentation doesn't say the units for these parameters, let's add it. This is confusing, for example, because if we set a padding like:

map.getMyLocationViewSettings().setPadding(0, mapView.getHeight() / 2, 0, 0);

We'd expect the MyLocationView object to be at the bottom of the screen. However, the result is slightly different:

screenshot_20161019-153126

/cc: @tobrun @cammace

Activity

  1. tobrun commented on Oct 20, 2016

    @tobrun
    Member

    we divide the padding immediately by 2 when setting, this is needed for correctly calculating the center point for tilt offset later on but is now also taking into account when caculating location on screen. Workaround for now is doubling the value.

  2. added
    Android
    on Oct 20, 2016
  3. tobrun commented on Aug 14, 2017

    @tobrun
    Member

    MyLocationView is going to be replaced with LocationLayer.

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions