-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Refine Camera API #3358
Comments
So if you call Google’s |
Yep. I built an example app using the Google Maps API which on load centers on a Marker in Sydney, Australia. I added an "Animate" button which calls the exact 1 argument |
…amera() API method. Updating CameraActivity to use only animateCamera() and moveCamera() API.
My first iteration made the Core GL camera methods private, added |
I created the following screen recording videos to help illustrate the differences between what the Camera API methods do: |
I just rebased and merged these into |
The fundamentals of the Camera API were built in #3244 , now the developer API can be refined to be more consistent with the Google Maps API. This means the following:
Make Core GL Methods Private
The Core GL animation methods are
jumpTo()
,easeTo()
, andflyTo()
. They are currentlypublic
methods which means developers can access them directly. They need to be made private and only accessible via the Google Maps like API wrapper methods (animateCamera()
,moveCamera()
, andeaseCamera()
).Add moveCamera() Method
The Google Maps API has a
moveCamera()
method which should be the wrapper method for Core GL'sjumpTo()
.Create easeCamera() Method
The Google Maps API does not have a method for "easing the camera", only for animation (aka
animateCamera()
). Create a neweaseCamera()
method to wrap Core GL'seaseTo()
method. This will expose Mapbox's additional functionality, while sticking with the familiar naming convention.Update TestApp's CameraActivity Buttons
The three buttons in the CameraActivity currently call the three different iterations of the
animateCamera()
method. Update them to directly invoke:moveCamera()
,easeCamera()
, andanimateCamera()
.The text was updated successfully, but these errors were encountered: