Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

add bearing and tilt to getCameraForLatLngBounds #12290

Merged
merged 3 commits into from
Jul 5, 2018
Merged

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Jul 3, 2018

Closes #12238

Todo:

  • add similar API for geometry (see here)

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Jul 3, 2018
@tobrun tobrun added this to the android-v6.3.0 milestone Jul 3, 2018
@tobrun tobrun self-assigned this Jul 3, 2018
@tobrun tobrun requested a review from LukasPaczos July 3, 2018 11:59
@tobrun tobrun mentioned this pull request Jul 4, 2018
Copy link
Contributor

@LukasPaczos LukasPaczos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀
A couple of comments, most of them pointing to the docs.



/**
* Get a camera position that fits a provided bounds, padding and tilt.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also mention a bearing.



/**
* Get a camera position that fits a provided bounds, padding and tilt.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should mention bearing instead of padding.

/**
* Get a camera position that fits a provided bounds and padding.
* Get a camera position that fits a provided bounds and the current camera tilt.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also mention that it includes the current bearing.



/**
* Get a camera position that fits a provided bounds and padding and the current camera tilt.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also mention that it includes the current bearing.

}

/**
* Get a camera position that fits a provided shape with a given bearing and padding.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't mention padding nor bearing.

*
* @param geometry the geometry to constrain the map with
* @param padding the padding to apply to the bounds
* @return the camera position that fits the bounds and padding
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The camera position will fit the geometry inside.

}

/**
* Get a camera position that fits a provided shape with a given bearing and padding.
*
* @param geometry the geometry to constrain the map with
* @param bearing the bearing at which to compute the geometry's bounds
* @param tilt the tilt at which to compute the geometry's bounds
* @return the camera position that fits the bounds and padding
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No padding, but bearing and tilt.

* @param padding the padding to apply to the bounds
* @param bearing the bearing at which to compute the geometry's bounds
* @param tilt the tilt at which to compute the geometry's bounds
* @return the camera position that fits the bounds and padding
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also bearing and tilt.

android:layout_width="match_parent"
android:layout_height="match_parent">

<!-- TODO remove zoom #6747-->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we check that to-do?

@@ -76,6 +75,8 @@

private String style;

private float pixelRatio;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are adding an option to set the pixel ratio, I think this value should also be pushed to the UiSettings during map initialisation.

@tobrun tobrun force-pushed the tvn-tilt-bounds branch from 23234c2 to 616bd4c Compare July 5, 2018 10:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants