Commit Graph

102 Commits

Author SHA1 Message Date
John Firebaugh
39cbfcb5c9 [core] Update to variant 1.1.0 2016-03-23 15:26:34 -07:00
Minh Nguyễn
55f60181cc [osx] Remove unnecessary build steps
Followup to 8cc0826620.
2016-03-23 10:28:20 -07:00
Dan Wexler
429ea535e5 Reset the translation to zero without adjusting for view to fix non-zero frame origin bug. 2016-03-20 09:32:17 -07:00
Minh Nguyễn
ff9c3a57b0 [ios, osx] Renamed MGLOfflineTask to MGLOfflinePack
“Offline pack” more effectively communicates the persistent nature of the downloaded content.
2016-03-10 17:14:14 -08:00
Minh Nguyễn
f5ac63dfec [ios, osx] Renamed offline classes
Renamed SDK classes related to offline viewing to more closely match the terminology used by mbgl and the Android SDK while remaining consistent with Cocoa naming principles.
2016-03-10 17:08:58 -08:00
Minh Nguyễn
e36218a866 [osx] Added OS X support for offline downloads 2016-03-10 17:08:58 -08:00
Minh Nguyễn
c2cd9335e9 [ios] Non-embedded static framework
Added a new ifabric Make target for packaging up a static framework similar to the one released as 3.0.1. Place artwork and certificate assets inside Mapbox.bundle inside Mapbox.framework. Link SystemConfiguration in the umbrella header.

Distinguish between the framework bundle and the resources bundle. For the dynamic frameworks and embedded static frameworks, the two are the same; for the non-embedded static framework, the latter resides inside the former.
2016-03-08 11:20:12 -08:00
Bruno de Oliveira Abinader
c17e954983 [android|ios|osx] Fix return type for pixelForLatLng 2016-03-01 20:58:54 +00:00
Bruno de Oliveira Abinader
4994b3dc57 [core] PrecisionPoint is now ScreenCoordinate 2016-03-01 20:58:54 +00:00
Minh Nguyễn
17f44d7bd9 Merge branch 'release-ios-v3.1.0' 2016-02-24 09:06:43 -08:00
Jason Wray
21ce6fbdf9 [osx] Set default polyline and polygon color to the selected menu item color
Fixes #3927
2016-02-18 19:27:49 -05:00
Minh Nguyễn
87f28f3f44 [osx] Typo in readme 2016-02-18 10:46:01 -08:00
John Firebaugh
13e2acbc75 [ios, osx] Consolidate remaining files in platform/{ios,osx} 2016-02-12 14:53:52 -08:00
Thiago Marcos P. Santos
43ed846a12 [build] Build offline tool on the bots
Make sure it doesn't break.
2016-02-11 17:25:15 +02:00
Thiago Marcos P. Santos
ff9dadba67 [build] Fix broken target when building on the bots 2016-02-11 17:24:48 +02:00
Minh Nguyễn
51d7d204db [ios, osx] Exclude misses from nearby annotations
After filtering out elements of a vector using std::remove_if(), it’s apparently necessary to resize the vector. Otherwise, removing only has the effect of shifting the non-matching items to the end of the vector. This change reduces the annotation tap target back to almost what it was before #3261, except that these days the target is centered around the annotation image rather than the center point. There remains a much smaller slop area around the annotation, but nothing close to the effective padding before this change.

Fixes #3880.
2016-02-10 22:02:46 -08:00
Minh Nguyễn
bd59ab9a52 [core, ios, osx] Only constrain after adding to a window
Introduced a setter/getter for constrain mode. On iOS and OS X, the zoom level inspectable causes the zoom level to be set independently from the longitude and latitude. Thus, the latitude inspectable had no effect because the latitude was constrained to 0 at z0. Temporarily removing the heightwise constraint allows the map to center on the intended location before zooming, which is the usual case for storyboards and XIBs. On iOS, the only guarantee we have timing-wise is that all the inspectables are applied after initialization but before the view is added to a window. So we reimpose the heightwise constraint as soon as the view is added to a window, that is, before the user has a chance to pan the map out of bounds.

Fixes #3868.
2016-02-10 15:15:29 -08:00
Minh Nguyễn
71611ec612 [ios, osx] Fixed crash reselecting annotation
Handle the case where the currently selected annotation isn’t one of the nearby annotations. This hasn’t come up before on OS X because clicking an annotation while another annotation is selected only dismisses the callout popover.

Fixes #3284.
2016-02-10 09:38:04 -08:00
Minh Nguyễn
7c7de0bc57 Link to latest iOS SDK API documentation 2016-02-08 13:20:00 -08:00
Konstantin Käfer
2f06ca74e2 [core] move platform/gl.hpp to gl/gl.hpp 2016-02-08 12:50:00 +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
Ansis Brammanis
b738087080 [osx] setMaximumZoomLevel, setMinimumZoomLevel
adds:
setMaximumZoomLevel
setMinimumZoomLevel

and makes `maximumZoomLevel` and `minimumZoomLevel` not readonly
2016-01-28 15:10:26 -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
Bruno de Oliveira Abinader
2f86467586 Cleanup std::chrono usage
Use mbgl::Duration and mbgl::{,Milli}Seconds whenever possible.
2016-01-25 15:11:18 +02:00
Minh Nguyễn
f9360c3f4f [ios] Strip Simulator content when archiving
Copied strip-frameworks.sh from realm/realm-cocoa@7cc31db631 for realm/realm-cocoa#2759. This script, which is embedded in the dynamic framework, strips out content for invalid architectures from any embedded framework and specifically strips out Simulator content when archiving to work around an App Store bug.

Rewrote the iOS setup documentation. In particular, the MAPBOX_ACCESS_TOKEN environment variable is only for use with the iosapp demo application and doesn’t work in third-party applications.
2016-01-22 14:45:57 -08:00
Minh Nguyễn
65f6eb25b5 [ios, osx] Optionally animate content insets change 2016-01-20 11:02:31 -08:00
Ansis Brammanis
d34f8eb674 [core][ios][osx][android] make SpriteImage accept PremultipliedImage
the SpriteImage constructor signature changes from

SpriteImage(
        uint16_t width, uint16_t height, float pixelRatio,
        std::string&& data, bool sdf = false);

to

SpriteImage(PremultipliedImage&&, float pixelRatio, bool sdf = false)
2016-01-19 18:23:21 -08:00
Ansis Brammanis
26faa6a5ad [core][ios][osx][android] fix icons with non-integer width/height
ref #3031
ref #2198

For example, an icon that has:
- a pixel width of 10
- a pixel ratio of 3
- a scaled with of 3.333
is now supported.
2016-01-19 18:20:54 -08:00
Bruno de Oliveira Abinader
0aa89f6eb1 [osx] No need to link with libpng & libjpeg
OSX platform includes platform/darwin/image.mm which uses CoreFoundation
to decode PNG and JPEG images.
2016-01-19 15:40:23 +02:00
Minh Nguyễn
47b69100f9 [core, ios, osx, android, glfw] Flipped origin of Map::latLngForPixel(), Map::pixelForLatLng()
Map and Transform methods assume an origin at the top-left corner of the view, like iOS, Android, and GLFW but unlike OS X. Transform is responsible for flipping coordinates between the top-left origin of Map and the bottom-left origin of TransformState.

Fixes #3574.
2016-01-18 16:54:58 -08:00
Minh Nguyễn
bf87eaa7b8 [core, osx] Added optional padding to convenience methods
Methods that offer a convenient way to jump or ease now accept an optional padding parameter. MGLMapView specifies the padding to ensure that keyboard-based zooming and rotation respects the toolbar.
2016-01-18 16:54:58 -08:00
Minh Nguyễn
c86646519a [osx] Content insets
Added a contentInsets property to MGLMapView that behaves similarly to NSScrollView.contentInsets. Adjust it according to the window’s content layout rectangle using KVO. Automatically apply the content insets whenever creating a CameraOptions or getting the center coordinates.
2016-01-18 16:54:57 -08:00
Minh Nguyễn
714dfab8ae [osx] Fixed static analyzer warnings 2016-01-14 16:48:16 -08:00
Minh Nguyễn
a3d4aeefec [osx] Consistent origins in gesture recognizers
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.
2016-01-14 00:39:57 -08:00
Minh Nguyễn
ac4b1b7479 [core] Standardize transform origin
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.
2016-01-14 00:39:56 -08:00
Minh Nguyễn
27b308a234 [core] Separated AnimationOptions from CameraOptions 2016-01-14 00:39:12 -08:00
John Firebaugh
5a7d2fd60e [core] Eliminate platform::assetRoot()
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.
2016-01-13 13:40:31 -08:00
Minh Nguyễn
5eaf7a6211 [ios, osx] Fixed Xcode 7.3 build
Fixed a compiler error that’s new in Xcode 7.3. Also corrected a typo in MGLMapView on OS X.
2016-01-11 14:21:15 -08:00
John Firebaugh
e7b0b31d58 [core] Privatize SQLiteCache 2016-01-08 12:31:13 -08:00
Dane Springmeyer
12345e56d4 [android, linux, osx] Upgrade to libpng 1.6.20
- refs https://github.com/mapbox/mason/tree/libpng-1.6.20
 - refs https://travis-ci.org/mapbox/mason/builds/100661025
2016-01-06 16:35:16 -08:00
John Firebaugh
e26b218883 [android, ios, osx] Emoji ⇢ ASCII in Bitrise notifications 2016-01-05 10:59:41 -08:00
Minh Nguyễn
f8f735b574 Rewrote documentation
Rewrote some copy to provide more context and link to more GL-related repos, including GL JS. Put the various SDKs in a table so we can show the various CI bot status images.

Integrated target list into the relevant documents. Rewrote large portions of iOS and OS X setup documentation to guide normal developers to more friendly places. Combined some Android documentation.

Moved SDK-specific documentation into platform/. Added a temporary readme in ios/ that points to the one in platform/ios/.
2016-01-05 08:04:16 -08:00
Minh Nguyễn
70f04c8bc5 Updated gesture help
Followup to #3426.
2016-01-05 00:02:33 -08:00
Minh Nguyễn
af4b9599cb Double-tap to zoom out on Magic Mice
Fixes #3426.
2016-01-04 15:20:25 -08:00
Minh Nguyễn
8aad739ec2 [osx] Fixed map feedback zoom level
The map feedback tool still uses mapbox.js, so its zoom levels are one off from Mapbox GL’s.
2016-01-04 11:40:31 -08:00
Minh Nguyễn
e17e27fb0e [osx] Corrected initial title for restored windows 2016-01-04 11:40:31 -08:00
Minh Nguyễn
0a23d4fe39 [osx] Restore last window regardless of system preference
Even with the system preference set to close windows when quitting, the user would still expect this map-centric application to remember the last viewed map, because the world map isn’t quite as interesting.
2016-01-04 11:40:31 -08:00
Minh Nguyễn
44a4f7bca2 [osx] Fixed URL handler, reload for new access token 2016-01-04 11:40:23 -08:00
Minh Nguyễn
019b3d5b92 [osx] Respect system window closing preference
Instead of forcing the system to restore windows between sessions (which confusingly switches the behavior of ⌘Q and ⌥⌘Q), honor the preference but have each new window inherit the style of the previous main window.
2016-01-04 11:40:18 -08:00
Minh Nguyễn
0712ed904b [osx] Make osxapp document-based
Allows for multiple map windows open at a time.
2016-01-04 09:33:00 -08:00