Commit Graph

7032 Commits

Author SHA1 Message Date
John Firebaugh
8aa3359ff0 [core] Don't use struct
It makes forward declarations inconsistent and liable to change, for no real gain.
2016-02-01 16:32:59 -08:00
John Firebaugh
04cc019f54 [core] Refactor TileJSON parsing for offline 2016-02-01 15:33:37 -08:00
John Firebaugh
716997b99e [tests] Refactor and make MockFileSource more general
Now it works more like StubStyleObserver: you can assign std::functions to specific slots based on resource type.

Rewrite resource loading tests in that style, making them less like integration tests of Style and more like unit tests of Source, GlyphStore, and SpriteStore.
2016-02-01 15:29:42 -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
Minh Nguyễn
5c1bad41bd Added scalable icon 2016-01-30 20:33:32 -08:00
Minh Nguyễn
8c0506da6b ios-v3.1.0-pre.3 2016-01-29 18:14:18 -08:00
John Firebaugh
2920020fb8 [core] Change TileData pixelRatio to an integer 2016-01-29 17:16:06 -08:00
John Firebaugh
b41a73e1c1 [core] Rationalize Resource initialization 2016-01-29 14:50:15 -08:00
John Firebaugh
849e8b32b4 [core] Ensure that FileSource has access to tile URL, pixelRatio, x, y, z 2016-01-29 14:50:15 -08:00
John Firebaugh
4dc7ec0202 [core] Camel-case member names 2016-01-29 14:49:25 -08:00
Ansis Brammanis
0439d00313 [core] fix redoPlacement blocking main thread, fix #3727
If a workRequest exists, don't cancel it and start an new request. It's
ok to just do nothing if the request exists because a new call to
redoPlacement will be triggered after the existing request finishes.

this fixes a regression in e44db93f1c
2016-01-29 10:35:40 -08:00
Jason Wray
1bdd0762d0 Add libjpeg-turbo license, remove libjpeg license
We switched to libjpeg-turbo in #3632.

Original license requirements: https://github.com/libjpeg-turbo/libjpeg-turbo/blob/master/LICENSE.md

License: https://github.com/libjpeg-turbo/libjpeg-turbo/blob/master/turbojpeg.c

[skipci]
2016-01-29 12:08:31 -05: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
Minh Nguyễn
db41391ccb [ios] Marked strip frameworks script executable 2016-01-28 17:56:25 -08:00
John Firebaugh
d90d374203 [core] Move rapidjson document creation into StyleParser 2016-01-28 17:37:23 -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
Ansis Brammanis
1644234179 [core] add setMaxZoom, setMinZoom
also change the default maxZoom to 20 to match -js.
2016-01-28 15:10:01 -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
a81dfdd753 [android] #3716 - Updating CHANGELOG 2016-01-28 13:11:44 -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
Konstantin Käfer
e2a3c02d1a [core] destruct WorkTask data before calling the callback 2016-01-28 10:52:33 +01: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
0d3af14375 [ios] Added #3049 to changelog 2016-01-27 01:29:15 -08:00
Minh Nguyễn
251fb06523 ios-v3.1.0-pre.2 2016-01-26 23:27:42 -08: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
Ansis Brammanis
9dcaab1933 [core] bump sprite atlas to 1024x1024 2016-01-26 13:27:16 -08:00