Commit Graph

1254 Commits

Author SHA1 Message Date
Tobrun
fa21051683 [android] #3830 added mocked parcel implementation 2016-02-05 14:32:58 +01:00
jaumeolba
026e6a7560 Fix Memory leak caused by duplicated add in LocationListener list
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.
2016-02-05 10:59:50 +01:00
Mike Morris
8e5862bd5d node-v3.0.2 2016-02-04 19:02:08 -05:00
Mike Morris
86691a08de [node] patch memory leak in NodeMap::request
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
2016-02-04 18:27:52 -05:00
Jordan Moncharmont
48dbd48e77 [ios] Explain prerelease testing in docs
Show how to point a podspec at an officially tagged pre-release.
2016-02-04 14:48:01 -08:00
John Firebaugh
4d29c7d5ce [core] Remove Response::Error::Reason::Canceled
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.
2016-02-04 13:18:14 -08:00
John Firebaugh
d7db9c775a [all] Make #include <mapbox/variant.hpp> universally accessible 2016-02-04 11:08:02 -08:00
Tobrun
7f27c74251 [android] #3811 - handle null target value by using previous camera position. 2016-02-04 12:35:39 +01:00
Tobrun
aa05cba0df [android] #3758 - Projection / Visible Region implementation.
[android] #3758 - add VisibleRegion + unit tests, removed boundingbox, cleanup jni, cleanup test app, renamed CoordinateSpan to LatLng.
2016-02-04 12:08:39 +01:00
Brad Leege
932012e931 [android][core] #509 - Setting Min and Max Zooms warning annotations in Android. Clamping Min and Max zooms at Core GL for all platforms to use at runtime. 2016-02-03 17:59:44 -06:00
Minh Nguyễn
e8b8f5e493 [ios] Fixed designable warning when showing user location
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.
2016-02-03 11:14:09 -08:00
Tobrun
9beb6629b6 [android] #3752 - added scroll by x,y feature, introduced new CameraUpdateType, introduced caching system for invalidating CameraPosition, general cleanup, readded getLatLng in MapView, ..
[android] #3752 - correctly invalidating cameraposition
2016-02-03 18:38:38 +01:00
John Firebaugh
37c27f3a8f [core] Improve LatLngBounds API
* 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
2016-02-02 23:04:18 -08:00
Tobrun
ce8c6e26d5 [android] #3736 - clicks should ignore marker validation when an InfoWindowAdapter is supplied by end developer. 2016-02-02 18:08:14 +01:00
Tobrun
6dff169f2b [android] #3754 - newLatLngBounds: unit tests for LatLng and LatLngBounds, builder pattern + refactoring.
[android] #3754 - Working version using the underlying VisibleCoorindateBounds

[android] #3754 - refactor Camera api inside maps package, correctly use factory pattern, LatLngBounds hooks into camera API

[android] #3754 - cleanup old API
2016-02-02 17:25:46 +01:00
Tobrun
a699690c16 [android] #3759 - Add SupportMapFragment, test app integration, cleanup old fragment implementation 2016-02-02 08:18:41 +01:00
Minh Nguyễn
7694eebe88 [ios] Renamed -showAnnotations:withEdgeInsets:animated:
Renamed -showAnnotations:withEdgeInsets:animated: to -showAnnotations:edgePadding:animated: for consistency with other methods. Reworded documentation comments to avoid hard-coding too many specifics that are prone to getting outdated.
2016-02-01 20:55:55 -08:00
Jordan Moncharmont
909832624e Custom edgeInsets for fitting in showAnnotations
Keeps sensible defaults already in place, but allows callers to override.
2016-02-01 20:55:55 -08:00
Tobrun
0e66d4dcc5 [android] #3776 - UiSettings uses MapView instead of MapboxMap as dependency. Cleanup obsolete methods MapboxMap/MapView, Renaming convention Google Maps SDK, Update tests, Some minor fixes in state management 2016-02-01 16:22:54 +01:00
Tobrun
6ebb3e88d8 [android] #3753 - Optimising zoom
[android] #3753 - removed old zoom methods from MapView
2016-02-01 16:08:09 +01:00
Tobrun
7c58c7803e [android] #3760 - parity with Google Maps SDK
[android] #3760 - added missing methods for UiSettings, updated tests and test app to reflect this change

[android] #3760 - typo fix
2016-02-01 12:47:14 +01:00
Tobrun
8ed1dc9f74 [android] #3145 - MapboxMap 2016-01-29 13:15:58 +01:00
Minh Nguyễn
710398b780 [ios] Removed redundant usage section
Also copied some further setup steps from the IB page on the project wiki.
2016-01-28 23:38:21 -08:00
Minh Nguyễn
6995452541 [ios] Restored toggleDebug
Restored (but deprecated) a method removed in #3100 to avoid a major version bump.
2016-01-28 22:36:58 -08:00
Minh Nguyễn
6b3b3f3ff6 [ios] Debug mask
Ported MGLMapDebugMaskOptions from the OS X SDK. Deprecated debugActive and -cycleDebugOptions.
2016-01-28 22:23:07 -08:00
Minh Nguyễn
8cdd02bc8f [ios] Eliminated “flashlight mode”
Avoid resetting user tracking state when going from location or course tracking mode to heading tracking mode.

Fixes #3710.
2016-01-28 17:57:44 -08:00
Ansis Brammanis
b738087080 [osx] setMaximumZoomLevel, setMinimumZoomLevel
adds:
setMaximumZoomLevel
setMinimumZoomLevel

and makes `maximumZoomLevel` and `minimumZoomLevel` not readonly
2016-01-28 15:10:26 -08:00
Ansis Brammanis
371a210be8 [ios] getters, setters for minZoom, maxZoom
adds:
minimumZoomLevel
setMinimumZoomLevel
maximumZoomLevel
setMaximumZoomLevel
2016-01-28 15:10:26 -08:00
Ansis Brammanis
ca0099b6a4 [android] getters, setters for minZoom, maxZoom
adds:
map.getMminZoom();
map.setMminZoom(double);
map.getMaxZoom();
map.setMaxZoom(double);
2016-01-28 15:10:26 -08:00
Brad Leege
94731a9ef0 [android] #3716 - Setting Android Version to 4.0.0-SNAPSHOT 2016-01-28 14:02:51 -06:00
Brad Leege
d3a027075f Merge branch 'master' into release-android-v3.2.0 2016-01-28 14:00:23 -06:00
Brad Leege
9fd7dd4597 [android] #3716 - Updating version to 3.2.0 for release 2016-01-28 11:54:21 -06:00
Brad Leege
41472054fc [android] #3728 - Adding Back Pressed support for App Bar Home Button 2016-01-28 11:44:08 -06:00
Brad Leege
87e28d09b2 [android] #3723 - Commenting out content padding in MapView API 2016-01-28 10:50:44 -06:00
Minh Nguyễn
eeeec862a2 [ios] Remove dependency on variable in package.sh
Fixes #3725.
2016-01-28 08:49:51 -08:00
Tobrun
1295ba7017 [android] #3692 - fix crash with bad internet connection 2016-01-28 09:01:59 +01:00
Tobrun
b492e2408d [android] #3708 - added code coverage test documentation and debug option 2016-01-28 08:09:54 +01:00
Jesse Bounds
fab847c128 [ios] Remove incorrect tab whitespace in method
This just removes some whitespace that made the implementation of
`pushTurnstileEvent` in `MGLMapboxEvents` look a little strange.

The indentation was right below an early return conditional
(with no braces) so it felt like the right thing to do (for
readability) to clean it up. Choosing and enforcing a consistent style
for conditionals with one line might be a good idea, too, but this
small change does not go there.
2016-01-27 13:46:31 -08:00
Larry Geromegnace
3d32c63f7d [android] Add getters for content paddings. 2016-01-27 10:57:38 -06:00
Larry Geromegnace
72ca584638 [android] Use padding to get center coordinates. 2016-01-27 10:57:38 -06:00
Larry Geromegnace
c114ed6562 [android] Add API to be able to set insets on MapView. 2016-01-27 10:57:38 -06:00
Minh Nguyễn
a5283b5798 [ios] Update location after clearing target coordinate 2016-01-26 22:59:27 -08:00
Minh Nguyễn
8a23bdcd01 [core, ios, osx] Tilt around visual center point
The tilt gesture on both iOS and OS X now respects the content insets. On iOS, in user tracking mode, it additionally respects the user dot’s position if it’s aligned to the top or bottom of the view.
2016-01-26 18:49:01 -08:00
Minh Nguyễn
97fc2120c4 [ios] Fixed entering tracking mode at launch
Entering user tracking mode at launch now zooms in and shows the user dot or user puck. The user dot’s heading indicator now points in the correct direction during the animation to the initial location. Course changes are reflected immediately even in the absence of location changes.

Fixes #1145.
2016-01-26 18:48:56 -08:00
Minh Nguyễn
14c052f5ce [ios] Refactored location updates
Broke out -locationManager:didUpdateLocations:animated: into multiple self-contained methods, simplifying the logic considerably.

Eliminated a jump after device rotation in non-centered tracking mode.
2016-01-26 17:19:23 -08:00
Minh Nguyễn
7057a1bb4a [ios] Bifocal viewport in course tracking mode
When a targetCoordinate is specified in course tracking mode, the map automatically resizes the viewport to show both the user puck and the target, one at the top and the other at the bottom. The user puck now rotates its arrow in the course direction, no longer assuming that the viewport is facing the same way as the course.
2016-01-26 17:19:22 -08:00
Minh Nguyễn
c5017652b9 [ios] Turn map around when user dot is top-aligned
Also fixed top- and bottom-aligned user dot center points to account for the content inset’s offset within the map view bounds.
2016-01-26 17:19:22 -08:00
Minh Nguyễn
9b694058b0 [ios] Avoid jumping when setting user tracking mode
Account for the user dot’s alignment when flying to the initial user location. Previously, during incremental location updates, we relied on a hack in which the edge insets resulted in a 0×0 viewport, forcing the center upward or downward. But flyTo() relies on the viewport’s size to control the trajectory. So instead, all location updates now use a correctly-sized viewport centered on the offset user dot.

Pushed the user dot farther away from the view edges.

Programmatic rotation and compass rotation are now centered on the user dot even if it’s aligned at the top or bottom. Previously, pressing the compass would trigger a rotation centered on the center of the view.
2016-01-26 17:18:26 -08:00
Minh Nguyễn
87f0174967 [ios] Various user tracking mode fixes
Setting the user tracking mode without animation now works. Previously, it kept the user dot from ever updating.

Just as a zoom gesture no longer kicks the user out of user tracking mode, programmatically zooming shouldn’t either.

Setting a camera with an invalid center coordinate no longer attempts to change the center coordinate but still changes any other valid properties.

Made animation to new user dot vertical alignment optional.
2016-01-26 17:17:25 -08:00
Mike Morris
a3284ad7e2 node-v3.0.1 2016-01-26 11:10:54 -08:00