Commit Graph

874 Commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
c13dd32242 [core] Added Viewport mode
Satisfies embedding platforms that requires the viewport coordinate
systems to be set according to its standards e.g. viewport mirrored
vertically.
2016-05-11 15:48:51 +03:00
Brent W
348cfaab12 [ios] fix potential for very slow animations of user location dot (#4997)
fix logic error that could cause user location to animate extremely slowly if there is a significant time passing between location updates
2016-05-10 16:55:00 -07:00
Minh Nguyễn
02f89b23b8 Merge branch 'release-ios-v3.2.2' into 1ec5-release-ios-v3.2.2-master 2016-05-10 13:11:47 -07:00
Minh Nguyễn
abe16952c6 ios-v3.2.2 2016-05-10 10:52:50 -07:00
Minh Nguyễn
b3d4a5cbf8 [ios, osx] Find nearby annotation when not persisting query
Fixed an issue that made the osxapp context menu only apply to the right-clicked pin after first selecting the pin. This also happened to be a latent bug in the iOS implementation.
2016-05-09 13:13:31 -07:00
Minh Nguyễn
2ed4e6cd4d ios-v3.3.0-alpha.2 2016-05-07 15:53:23 -07:00
Minh Nguyễn
98113787b8 ios-v3.2.2-rc.1 2016-05-06 17:23:53 -07:00
Minh Nguyễn
ca76b5b803 [ios, osx] Renamed version constant, linked to more info
Renamed MGLStyleCurrentVersion to MGLStyleDefaultVersion to emphasize the constant’s role as an indicator of the default version used by SDK classes, which may be behind depending on release schedules. In the documentation for each style URL method, include the actual version number instead of the constant. In unit tests, verify that this documentation is in sync with the constant.

Link each style URL method’s documentation to a forthcoming webpage on mapbox.com that describes the style in rich detail.

Cherry-picked from 2ec95bc490.
2016-05-06 17:17:17 -07:00
Minh Nguyễn
bac6fb4f84 [ios, osx] Renamed Hybrid to Satellite Streets
The style ID has also changed, but the unversioned method will continue to point to the old v8 style ID.

Cherry-picked from 5ccb43477f.
2016-05-06 17:17:06 -07:00
Minh Nguyễn
f7f6f775f4 [ios, osx] Pin unversioned style URL APIs to v8 styles
Cherry-picked from 4a112c00f1.
2016-05-06 17:16:55 -07:00
Minh Nguyễn
1d37eb3903 [core, ios, osx] Version default style URL APIs; deprecated Emerald
Updated default styles from v8 to v9. Deprecated the MGLMapView class methods in favor of new methods that take a version parameter. Deprecated Emerald outright in favor of Outdoors. Replaced usage of the unversioned MGLStyle methods with the corresponding versioned methods and MGLStyleCurrentVersion to ensure consistency.

Expanded MGLStyle unit tests to also assert that MGLStyle has the right number of style URL methods and that they’re all public. Linked the OS X SDK unit test bundle to libmbgl-core.a. Removed an unnecessary dependency on osxapp.

Replaced Emerald with Outdoors in iosapp and osxapp.

Fixes the iOS and OS X side of #4577 and #4702.

Cherry-picked from 2a4eeadb29.
2016-05-06 17:16:29 -07:00
John Firebaugh
771e79a769 [core] Update geometry to 0.3.0 2016-05-06 11:59:29 -07:00
Minh Nguyễn
2ec95bc490 [ios, osx] Renamed version constant, linked to more info
Renamed MGLStyleCurrentVersion to MGLStyleDefaultVersion to emphasize the constant’s role as an indicator of the default version used by SDK classes, which may be behind depending on release schedules. In the documentation for each style URL method, include the actual version number instead of the constant. In unit tests, verify that this documentation is in sync with the constant.

Link each style URL method’s documentation to a forthcoming webpage on mapbox.com that describes the style in rich detail.
2016-05-06 11:06:52 -07:00
Minh Nguyễn
5ccb43477f [ios, osx] Renamed Hybrid to Satellite Streets
The style ID has also changed, but the unversioned method will continue to point to the old v8 style ID.
2016-05-06 11:06:51 -07:00
Minh Nguyễn
4a112c00f1 [ios, osx] Pin unversioned style URL APIs to v8 styles 2016-05-06 11:06:51 -07:00
Minh Nguyễn
2a4eeadb29 [core, ios, osx] Version default style URL APIs; deprecated Emerald
Updated default styles from v8 to v9. Deprecated the MGLMapView class methods in favor of new methods that take a version parameter. Deprecated Emerald outright in favor of Outdoors. Replaced usage of the unversioned MGLStyle methods with the corresponding versioned methods and MGLStyleCurrentVersion to ensure consistency.

Expanded MGLStyle unit tests to also assert that MGLStyle has the right number of style URL methods and that they’re all public. Linked the OS X SDK unit test bundle to libmbgl-core.a. Removed an unnecessary dependency on osxapp.

Replaced Emerald with Outdoors in iosapp and osxapp.

Fixes the iOS and OS X side of #4577 and #4702.
2016-05-06 10:57:54 -07:00
Minh Nguyễn
d28b6f3719 [ios, osx] Avoid recomputing tile cache size on every redraw
The tile cache size is only recomputed when an input changes.

Fixes #4026.
2016-05-06 08:47:18 -07:00
John Firebaugh
9330d674a9 [core] Use geometry.hpp's point 2016-05-05 11:30:53 -07:00
John Firebaugh
ce2a06e677 [core] Privatize math.hpp and vec.hpp 2016-05-05 11:16:57 -07:00
John Firebaugh
10e522d10b [core] Privatize various util headers (#4945) 2016-05-04 14:09:51 -07:00
Minh Nguyễn
89afbc648e ios-v3.3.0-alpha.1 2016-05-04 02:50:15 -07:00
Minh Nguyễn
9a280b8d9d [ios] Corrected map accessibility value
Corrected the English override strings for the map view’s accessibility value. Prior to this change, the accessibility value would say “0 annotation” instead of “0 annotations” for some reason.

The zoom level in the map view’s accessibility value is off by two.
2016-05-04 02:23:20 -07:00
Minh Nguyễn
5f0a01705f [ios] Fixed KIF tests
Link to the libKIF.a in the shared build products directory instead of at a nonexistent, hard-coded path. Fixed a compilation error in the KIF tests caused by importing a project-internal header even after the KIF project was moved out of the test project. Updated accessibility labels.
2016-05-04 00:54:02 -07:00
John Firebaugh
c8391729c7 [core] Use geometry.hpp feature type 2016-05-03 17:25:49 -07:00
Dane Springmeyer
c82b02c508 [core] port to protozero (#4906) 2016-05-03 13:57:17 -07:00
Dane Springmeyer
d4070d3356 Merge pull request #4919 from mapbox/follow-to-4916
Boost headers are no longer needed in project files after #4916
2016-05-02 16:53:10 -07:00
John Firebaugh
7800445c85 [core] Use gyp's direct_dependent_settings to propagate variant cflags 2016-05-02 13:12:24 -07:00
John Firebaugh
34f9618d31 [core] Replace boost::lexical_cast with std::to_string
This removes the only boost dependency from public headers.
2016-05-02 13:08:51 -07:00
Jason Wray
963ae18893 [ios] Fix analyzer's nullability complaints
- Redefine as local variables
- Check/assert that these local variables are not nil
2016-04-29 18:04:22 -04:00
John Firebaugh
10528091db [core] Upgrade to boost 1.60.0 (#4899) 2016-04-28 15:21:50 -07:00
Minh Nguyễn
c6420b1549 [ios] Updated offline pack tests
Updated the MGLOfflinePackProgress boxing test to test the two new fields. Wordsmithed the documentation a bit. Updated the changelog.
2016-04-27 13:41:29 -07:00
Minh Nguyễn
1dd7492fee [ios] Moved .stringsdict from Base.lproj to en.lproj
.stringsdict overrides need to be in real language .lprojs, not Base.lproj.
2016-04-26 21:55:32 -07:00
Minh Nguyễn
51cd97861c [ios] Announce zoom level, visible annotations after zooming
Announce the zoom level and number of visible annotations after zooming using VoiceOver’s swipe up or swipe down gesture.

Works toward #4821.
2016-04-26 16:47:04 -07:00
Minh Nguyễn
8d5a6b515f [ios] Only post layout change notifications when focused
Constantly posting accessibility layout change notifications on every location change made it very difficult to stay focused on an accessibility element, be it the user dot or some other element. Now we only post the notification when the user dot is focused, user tracking mode is off (so the user dot actually has a chance to move around), and the application is active (not in the middle of application switching).
2016-04-26 14:19:10 -07:00
Minh Nguyễn
193a843013 [ios] Fixed ℹ️, user dot accessibility
The user location annotation view is created lazily, so if the user dot isn’t within view at launch, it doesn’t exist by the time UIKit first queries MGLMapView for child accessibility elements. This caused console spew about missing accessibility elements and prevented the ℹ️ from being visible to XCUITest.
2016-04-26 14:19:05 -07:00
Minh Nguyễn
27f77b6bfa [ios] Hide compass from VoiceOver when pointing north
Fixes #4820.
2016-04-26 00:16:20 -07:00
Minh Nguyễn
cf2ef5b40b [ios] Use default images for world tour destinations
Use the default red pin images for world tour destinations in iosapp instead of the two characters usually used for the “Add n Points” actions.
2016-04-25 22:02:06 -07:00
Jason Wray
8ce0fb4739 [ios] Update frame size when changing dot/puck mode
- Keeps the same center point
- `updateFrameWithSize:` does not take CGSize because there is not yet
  support for non-square user location annotations
2016-04-25 17:00:43 -04:00
Minh Nguyễn
d9a2a845de [ios] Added accessibility labels, hints, gestures
Fixed an issue where the “return to map” accessibility element lacked a label. Always update the title and subtitle of an annotation accessibility element, in case the title or subtitle changes from one showing to the next.

Added a hint for annotations. Use declarative rather than imperative for hints.

Marked the map view and its annotations as adjustable so that swiping up and down with VoiceOver zooms out and in, respectively.

Added accessibility values to toolbar buttons in iosapp.
2016-04-25 00:24:35 -07:00
Minh Nguyễn
7cc3928a19 [ios] Made annotation callouts accessible
Via nfarina/calloutview#84, SMCalloutView is now accessible. Activating a focused annotation now shows its callout view and focuses its left accessory view, if present, or the title view. There is a “return to map” accessibility element for dismissing the callout view and restoring focus to the annotation on the map.
2016-04-25 00:18:57 -07:00
Minh Nguyễn
9d3269eaa3 [ios] Restored user dot accessibility
Put the user dot back into rotation as an accessible element.
2016-04-25 00:18:06 -07:00
Minh Nguyễn
babc43ea62 [ios] Made annotations accessible
Lazily create and cache accessibility elements for visible annotations as UIAccessibility asks about them.

Sort the annotations’ accessibility elements by the annotations’ distance from the logical center (the center after accounting for padding, or the user dot when user tracking mode is on).

Updated the changelog.

Fixes #1493.
2016-04-25 00:17:02 -07:00
Minh Nguyễn
893a777a2f [ios] Made compass and user dot accessible
Made the compass behave like a button when visible. Added accessibility values and hints. The compass’s accessibility value uses the compass direction formatter. Turned off direct interaction with the map because it obscures the ornaments.

The user dot now reports the current coordinates. Its accessibility label now reflects its annotation’s title instead of the hardcoded label “User location”. (It’d be weird to address the VoiceOver user as “user”.)
2016-04-25 00:16:28 -07:00
Minh Nguyễn
9350075812 [ios] VoiceOver support for MGLMapView
Enabled direct interaction with `MGLMapView`, allowing for panning and so forth. Defined an accessibility value that announces the current center coordinate. Inset the map view accessibility frame to exclude ornaments from the interactive element.
2016-04-25 00:15:56 -07:00
Minh Nguyễn
c376380112 [ios] Added separate target for Settings.bundle
Added a separate target to produce the example Settings.bundle. Use the build product in iosapp instead of a folder reference.

Added the bundle and settings targets as dependencies on the dynamic and static targets instead of listing them explicitly in various schemes.
2016-04-24 17:58:05 -07:00
Minh Nguyễn
8de7a75f02 [ios] Use base localization for Settings.bundle
Also converted the bundle’s strings file from UTF-16 encoding to UTF-8 encoding for better diffability.
2016-04-24 17:39:17 -07:00
Minh Nguyễn
540bbc537e [ios] Fixed ios-test build warnings 2016-04-24 16:41:19 -07:00
Minh Nguyễn
19f4236ebb [ios, osx] Document common workflows
We have a lot of targets now, and it isn’t always clear to new contributors where files end up. Hopefully this brief guide to adding files will help.
2016-04-24 16:18:23 -07:00
Minh Nguyễn
f85f4f4105 [ios] Streamlined resource bundling
Added a target that produces Mapbox.bundle.

Replaced $BUNDLE_RESOURCES and $PLACE_RESOURCE_BUNDLES_OUTSIDE_FRAMEWORK with a single variable, $SELF_CONTAINED, that determines whether the output static framework is self-contained – that is, whether it contains Mapbox.bundle, Settings.bundle, and LICENSE.md. Eliminated the ability to produce a static framework that has the same layout as a dynamic framework. Now, resources are always in Mapbox.bundle; self-containment only determines where that bundle resides.

Added a separate source Info.plist to be placed in both the static framework and its resource bundle, but only after we give the build system a chance to expand variables within it. Now nearly all the Info.plist keys are filled in by the build system rather than using plutil in package.sh.
2016-04-24 16:18:23 -07:00
Minh Nguyễn
95613bd7dd [ios, osx] Made OS X SDK localizable
Replaced the iOS-specific ilocalize make rule with a genstrings make rule that creates iOS, OS X, and shared strings files. Moved the override English .stringsdict file under darwin/resources/. Made the default OS X callout view XIB localizable. Made some hard-coded strings in the OS X SDK source localizable.
2016-04-24 16:18:23 -07:00