Commit Graph

632 Commits

Author SHA1 Message Date
Konstantin Käfer
2f06ca74e2 [core] move platform/gl.hpp to gl/gl.hpp 2016-02-08 12:50:00 +01: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
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
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
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
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
371a210be8 [ios] getters, setters for minZoom, maxZoom
adds:
minimumZoomLevel
setMinimumZoomLevel
maximumZoomLevel
setMaximumZoomLevel
2016-01-28 15:10:26 -08:00
Minh Nguyễn
eeeec862a2 [ios] Remove dependency on variable in package.sh
Fixes #3725.
2016-01-28 08:49:51 -08: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
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
Jason Wray
9418f9a987 [ios] Avoid the blue background location status bar
Apps with `whenInUse` location permission will show a blue status bar
when they continue to use location services after leaving the
foreground. This is worrying and to be avoided, so let's disable telemetry
location services in this situation.

Fixes #2945
2016-01-25 14:59:38 -05: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
cc47da5a15 [ios] Allow removing never-added annotations
https://github.com/mapbox/mapbox-gl-native/issues/3159#issuecomment-174422048
2016-01-24 23:19:15 -08:00
Jason Wray
d559c19e95 [ios] Update IB designables message to remove Settings.bundle mention
Settings.bundle is no longer a requirement to get started.

[skipci]
2016-01-22 21:50:40 -05:00
Minh Nguyễn
556690fae8 [ios] No manual rotating in heading/course tracking mode
Manually rotating the map in heading or course tracking mode now kicks the user back into location tracking mode.
2016-01-22 15:35:58 -08:00
Minh Nguyễn
c062494536 [ios] Disable user tracking in -setVisibleCoordinates:
Programmatic modification of the viewport should kick the user out of user tracking mode.
2016-01-22 15:35:58 -08:00
Minh Nguyễn
31120ea41b [ios] Settings.bundle no longer required 2016-01-22 14:45:58 -08:00
Minh Nguyễn
f65ff9ef30 [ios] Split API index from package readme
The API index page serves a different purpose than the readme. It doesn’t need installation instructions, but it does need a brief What’s New section.
2016-01-22 14:45:58 -08:00
Minh Nguyễn
83deed6a88 [ios] make idocument
Split API documentation generation into a separate make target that can be run independently of building the SDK.
2016-01-22 14:45:58 -08:00
Minh Nguyễn
5d516c3603 [ios] Split changelog out from readme
CocoaPods dings this pod for not having a separate changelog.
2016-01-22 14:45:58 -08:00
Minh Nguyễn
9427ddd373 [ios] Polished package readme
Omit setup instructions for package formats not included in the build output.
2016-01-22 14:45:58 -08:00
Minh Nguyễn
5213abbde5 [ios] Rewrote package readme
The build output’s readme now explains in full detail the installation process, rather than linking to an online resource that may not match the current version. Also cleaned up the tag-finding code to better handle double-digit situations.
2016-01-22 14:45:58 -08:00
Minh Nguyễn
1ddce4cb3a [ios] Documented make targets 2016-01-22 14:45:58 -08:00
Minh Nguyễn
1d395e72bd [ios] Derive Fabric versioning from Info.plist
Avoid hard-coding the bundle identifier and version string.
2016-01-22 14:45:57 -08:00
Minh Nguyễn
7338db692d [ios] Refactored build scripts
package.sh now recognizes several environment variables through make that influence the build settings and targets. Info.plist variables are substituted with the correct values in both the static and dynamic frameworks.

Fixes #3656.
2016-01-22 14:45:57 -08:00
Minh Nguyễn
f986417f5c [ios] Put static library inside framework bundle 2016-01-22 14:45:57 -08:00
Minh Nguyễn
26578ea9d5 [ios] Look for resources in static framework bundle
The library is packaged as a static framework, so there isn’t a separate resource bundle anymore. Instead, look for the static framework inside the Frameworks folder.
2016-01-22 14:45:57 -08: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
9350d3f78c [ios] Converted iOS SDK into dynamic framework
make iproj now produces a target that pulls together static libraries like core and platform-ios into a real dynamic framework. iosapp is pretty much just a regular iOS application that links Mapbox.framework (except for the inclusion of default_styles.hpp). iosapp runs fine in the Simulator and on a device, and the same is true for any application linking against Mapbox.framework.

The ipackage target produces both a Bitcode-disabled static framework and a Bitcode-enabled dynamic framework, eliminating the need for a separate framework.sh. It disables code signing, since that happens on copy when the framework is embedded inside the application bundle. It also merges the device and simulator builds into a single fat framework.

Also bumped itest minimum deployment target to iOS 8.0, the first version that supports linking frameworks.

Fixes #828.
2016-01-22 14:45:56 -08:00
Minh Nguyễn
698eb674a7 Update INSTALL.md
These changes dropped out of #3416 somehow. The screenshots only make sense inside the gyp-generated project, which is irrelevant in this case.
2016-01-21 13:50:00 -08:00
Jason Wray
4a3adddf3f [ios] add telemetry debug logging
You SHOULD NOT be using telemetry logging on any persons' devices who do
not explicitly understand the privacy implications of handling location
data.
2016-01-20 18:57:43 -05:00
Minh Nguyễn
460b21e324 [ios] z14 initially in user tracking mode
When entering user tracking mode from a low zoom level, zoom in to z14 regardless of the location’s horizontal accuracy.
2016-01-20 11:02:31 -08:00
Minh Nguyễn
bd4611107d [ios] Reset user tracking, respect content inset in resetPosition 2016-01-20 11:02:31 -08:00
Minh Nguyễn
5a00427386 [ios] Maintain user tracking, anchor on user dot during zoom, rotate
Per MapKit behavior, zooming or rotating with a gesture can no longer kick the user out of user tracking mode. In user tracking mode, the zoom animation is always anchored on the user dot, wherever it may be.
2016-01-20 11:02:31 -08:00
Minh Nguyễn
65f6eb25b5 [ios, osx] Optionally animate content insets change 2016-01-20 11:02:31 -08:00
Minh Nguyễn
07c4c54111 [ios] Made user dot position configurable
The user dot or user puck’s position is now configurable via a new alignment property in any user tracking mode. Also, -setUserTrackingMode:animated: is now exposed publicly, and setting its animated parameter to NO skips the initial animation.
2016-01-20 11:02:31 -08:00
Minh Nguyễn
a93e7d7baa [ios] Non-animated user tracking mode changes
Calling -setUserTrackingMode:animated: with animated set to NO should jump instantaneously to the first reported location.
2016-01-20 11:02:31 -08:00
Minh Nguyễn
35895af5d4 [ios] Keep user dot callout open after user location change
Outside of user tracking mode, the user dot moves in spurts, so view synchronization performance isn’t an issue.
2016-01-20 11:02:31 -08:00
Minh Nguyễn
59f2c53c26 [ios] Keep callout attached to moving user dot 2016-01-20 11:02:31 -08:00