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

352-featuresAt (merged master into 352-featuresAt and resolved build errors) #3851

Closed
wants to merge 468 commits into from

Conversation

jonkan
Copy link

@jonkan jonkan commented Feb 8, 2016

Thought I'd try to help by updating the 352-featuresAt branch. There were a fair amount of conflicts, please let me know if you'd prefer I do this in another way that would make it easier for you to review my conflict resolution.

jfirebaugh and others added 30 commits January 13, 2016 13:38
* Move asset:// URL handling to DefaultFileSource.
* AssetFileSource implements FileSource interface and follows familiar implementation patterns.
* Move default implementation to platform/default, zip implementation to platform/android.
* Don't bother with modified / expires / etag -- assets are not cached so it doesn't matter.
* Don't bother with interleaving individual IO calls on the implementation thread. That adds a lot of complexity for very little benefit.
I regenerated assets.zip so that all file paths have an `assets/` prefix, as the Android AssetFileSource implementation asserts, and removed `TEST_DATA` from the paths.
Eliminated many redundant methods on Transform. Minimized usage of TransformState::x and TransformState::y. Added convenient constructors for AnimationOptions. When scaling, passing in view’s origin as the anchor no longer anchors the scaling operation at the view’s center. To specify no anchor, use NaN.

Increased precision of worldSize(), now that it’s used much more heavily in transform methods.
All Transform methods that take a PrecisionPoint now assume a “flipped” origin at the upper-left corner of the view. Previously, some methods assumed an origin at the lower-left corner.
Cleaned up gesture recognizers, flipping the origins of anchor points only and always before calling mbgl methods. This exposed the fact that the cursor locking feature during drag-zoom/rotate/tilt was broken, so I fixed it to match MapKit behavior exactly and also account for modifier changes in mid-gesture.
Made anchor a CameraOption for easeTo().
Pushed much of easeTo() and flyTo() into startTransition() to avoid code duplication.
Removed std::move() call per Xcode fix-it suggestion.
this avoids double "Error: Error: reason" messages
This is a tricky one:

We are storing a lambda at the member variable `transitionFrameFn` and
capturing `this` at this lambda function.

At some point when running the callback, we set `transitionFrameFn` to
`nullptr`, effectively destroying the callback that is being executed.

After this point, `this` is no longer valid, as the memory gets
cleared and it might point to the correct location (or not). That
is why it works on some compilers but not on g++ 5.3.1. Touching
any `this->[smth]` is undefined after that.

The fix is just move `transitionFrameFn = nullptr` to the last
thing we do on the callback. This behaves similarly to calling
`delete this` on a class method.
There is only one implementation and we're unlikely to add more.
Fails on CI because KIF is unstable. Refs
61615a4, mapbox#2769, mapbox#2734
ansis and others added 27 commits February 2, 2016 16:17
* Use "named constructors": empty, world, hull
* Make the two-argument constructor lenient (i.e., it is a hull operation)
* Add various accessors
* Enforce a single empty representation
…ameraUpdateType, introduced caching system for invalidating CameraPosition, general cleanup, readded getLatLng in MapView, ..

[android] mapbox#3752 - correctly invalidating cameraposition
Implicit bool conversions are bad; they'll be used e.g. for a == b and a != b if those operators are not defined. This was happening at https://github.com/mapbox/mapbox-gl-native/blob/032c8fba3c8e3c122dd399b5c9341d92ad9d286f/src/mbgl/map/transform.cpp#L132-L132, for example.
Turn the Shows User Location inspectable into a no-op when running in the designables agent. Otherwise, we complain that the agent lacks Location Services permissions.
…tions in Android. Clamping Min and Max zooms at Core GL for all platforms to use at runtime.
[android] mapbox#3758 - add VisibleRegion + unit tests, removed boundingbox, cleanup jni, cleanup test app, renamed CoordinateSpan to LatLng.
StubFileSource gets an optional Response return type. Returning null means "cancelled; don't call the callback".

Fixes mapbox#3784
There is no such thing as a cancelled response, only cancelled requests. A request that is cancelled does not have its callback called with a Response.
Show how to point a podspec at an officially tagged pre-release.
Creating a v8::Function with
Nan::GetFunction(Nan::New<v8::FunctionTemplate>) can leak, use
Nan::New<v8::Function> instead.

https://code.google.com/p/chromium/issues/detail?id=272579
The addLocationListener method didn't check if the LocationListener was
already in the list.

From MapView, if we call setMyLocationEnabled(true), it adds a
LocationListener and onResume adds the same LocationListener again, but
is just removed by onPause.

So LocationListener is added twice but removed just once, so
LocationServices singleton keeps an instance of the the LocationListener
that is never released.
@1ec5
Copy link
Contributor

1ec5 commented Feb 8, 2016

Hi, thanks for taking this on. You'd get a much cleaner result (for probably less work) if you open the pull request against master instead of the original branch. We'll close the original PR in favor of your new PR, to preserve the existing discussion while keeping the commit history relatively clean.

@jonkan
Copy link
Author

jonkan commented Feb 8, 2016

Sure! Closing this in favour of #3854 then.

@jonkan jonkan closed this Feb 8, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.