You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
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(), and flyTo(). They are currently public 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(), and easeCamera() ).
Add moveCamera() Method
The Google Maps API has a moveCamera() method which should be the wrapper method for Core GL's jumpTo().
Create easeCamera() Method
The Google Maps API does not have a method for "easing the camera", only for animation (aka animateCamera()). Create a new easeCamera() method to wrap Core GL's easeTo() 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(), and animateCamera().
My first iteration made the Core GL camera methods private, added moveCamera(), and updated the TestApp's CameraActivity to only use moveCamera() and animateCamera(). As part of this I also changed the animateCamera() zero second duration choice to use easeTo() instead of jumpTo(). However when testing it, it still behaved as an immediate move so it looks like a standalone easeCamera() method is going to be needed as originally thought.
Activity
1ec5 commentedon Dec 19, 2015
So if you call Google’s
animateCamera()with aCameraUpdatethat changes theLatLng, you get a zoom-out-pan-zoom-in motion like withflyTo()?bleege commentedon Dec 20, 2015
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
animateCamera()method. The result is that it does aflyTo()animation from Sydney to new location in Green Bay, Wisconsin.[android] #3358 - Making Core GL camera methods private. Adding moveC…
bleege commentedon Dec 20, 2015
My first iteration made the Core GL camera methods private, added
moveCamera(), and updated the TestApp's CameraActivity to only usemoveCamera()andanimateCamera(). As part of this I also changed theanimateCamera()zero second duration choice to useeaseTo()instead ofjumpTo(). However when testing it, it still behaved as an immediate move so it looks like a standaloneeaseCamera()method is going to be needed as originally thought.[android] #3358 - Created easeCamera() API method.
[android] #3358 - easeTo() uses nanoseconds instead of milliseconds
bleege commentedon Dec 20, 2015
I created the following screen recording videos to help illustrate the differences between what the Camera API methods do:
bleege commentedon Dec 20, 2015
I just rebased and merged these into
release-android-v2.4.0. I'll produce a new2.4.0-SNAPSHOTnow so that others can test the API out.bleege commentedon Dec 20, 2015
Just started the SNAPSHOT build process on Bitrise. Should be on Maven Central's SNAPSHOT server in 30 minutes.
/cc @zugaldia @1ec5 @tobrun