Commit Graph

7507 Commits

Author SHA1 Message Date
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
Minh Nguyễn
7a1d62dc30 [ios, osx] Corrected quarter wind abbreviations 2016-04-24 16:18:23 -07:00
Minh Nguyễn
7a23270532 [ios] Parentheses for build variables 2016-04-24 16:18:23 -07:00
Minh Nguyễn
f1200d47db [ios, osx] Made localizable strings unique; unlocalized iosapp
Assigned unique IDs to localizable English strings in code.

Made iosapp non-localizable. For the time being, it isn’t worth the trouble to localize more strings for this demo application than for the SDK itself.
2016-04-24 16:17:43 -07:00
Minh Nguyễn
e4752912da [ios, osx] Corrected clock, coordinate formats
Long unit style isn’t intended to be spelled out, so the clock and coordinate direction formatters now use numerals for long unit style, differing from medium unit style in less drastic ways. The locale no longer needs to be exposed, since it’ll always match the overall string’s locale. Added support to the coordinate formatter for different unit styles. Made minutes and seconds of arc optional.

Maintain strings for darwin/ formatter classes in a separate Foundation strings table that can be shared between the iOS and OS X SDKs. Added an English .stringsdict override that correctly pluralizes units.

Capitalize osxapp window titles, now that they spell out the directions.
2016-04-24 16:13:54 -07:00
Minh Nguyễn
6c9ca4be50 [ios] Made SDK and iosapp localizable
Made storyboards and strings throughout the SDK and iosapp localizable. Replaced the compass image with an unlabeled image. Draw a localizable string atop it at runtime.

Redefined NSLocalizedString() and NSLocalizedStringFromTable() macros to look at the SDK bundle rather than the main application bundle. This redefinition has no effect on the host application, because it’s in an internal header. That header must be included in all files that contain localizable strings. See NSBundle+MGLAdditions.h for a full explanation.

Added a make rule that runs genstrings and ensures UTF-8 output (since genstrings insists on UTF-16).

Use MGLCoordinateFormatter in iosapp for dropped pin callouts. Rely on subclasses of MGLPointAnnotation instead of annotation titles to distinguish between different kinds of point annotations.
2016-04-24 16:13:08 -07:00
Minh Nguyễn
fd93cf969d [ios] Fixed jazzy build step
Fixed some regressions introduced in 9c9ff2d2d4 for #4802. A backslash was missing from a shell script, causing arguments to get dropped and output to go in the repo root. Paths in the jazzy configuration file needed to be updated so jazzy could find the headers.
2016-04-24 11:37:01 -07:00
Minh Nguyễn
a421028481 [ios] Only build static framework for Fabric 2016-04-24 11:35:50 -07:00
Tobrun
158e163a69 [android] #4814 - simplified mock parcel testing, update tests to reflect these changes 2016-04-24 10:23:49 +02:00
Minh Nguyễn
3e22369f27 [ios, osx] Eliminated platform/{ios,osx}/include
Also updated various project references to be group-relative, so Xcode chooses the right directory by default when adding a new file.

Fixes #4770.
2016-04-23 10:35:59 -07:00
Minh Nguyễn
2d32336a41 [osx] Moved resources one level up
Moved SDK resources to sdk/, by analogy with framework/ for iOS resources.

Moved the umbrella header into include/, for consistency with the iOS SDK.
2016-04-23 10:15:18 -07:00
Tobrun
21191b3094 [android] #4396 - Cleanup + javadoc TrackingSettings class 2016-04-23 07:16:49 +02:00
Tobrun
fe7ebb0966 [android] #4396 - fixed test activity tracking settings modes, Deprecated old configuration of tracking settings and introduced more flexible configuration. 2016-04-23 07:16:37 +02:00
Tobrun
452c892dab [android] #4396 - UserLocationView Refactor fix tests 2016-04-23 07:16:37 +02:00
Tobrun
b7c4919e7f [android] #4396 - UserLocationView accuracy & non-tracking animation + cleanup 2016-04-23 07:16:37 +02:00
Tobrun
f469cee1b4 [android] #4396 - fixup mason build issue 2016-04-23 07:16:37 +02:00
Tobrun
f40715d05e [android] #4396 - model integration 2016-04-23 07:16:17 +02:00
Tobrun
de44685a3f [android] #4396 - introduced behaviour model using a factory. fixed double tap zoom 2016-04-23 07:15:44 +02:00
Tobrun
45d219f7e9 [android] #4396 - cleanup code 2016-04-23 07:15:07 +02:00
Tobrun
f84268c4e9 [android] #4396 - new images for UserLocationView 2016-04-23 07:10:07 +02:00
Tobrun
00381a2ae0 [android] #4396 - UserLocationView refactor 2016-04-23 07:09:51 +02:00
Larry Geromegnace
b3e340ca11 [android] #4396 - UserLocationView improvements 2016-04-23 07:09:51 +02:00
Minh Nguyễn
668405e61f [ios] Updated changelog for core changes 2016-04-22 17:38:57 -07:00
Minh Nguyễn
2d19a70b00 [osx] Added screenshot 2016-04-22 17:13:33 -07:00
Minh Nguyễn
df0d1187da [ios, osx] Fixed direction, pitch restoration
Followup to #4790. Fixed a regression preventing the direction and pitch from being persisted across sessions.
2016-04-22 17:09:25 -07:00
Minh Nguyễn
466ed55200 [core, ios, osx] cameraThatFitsCoordinateBounds
Added an API to get a camera that you can pass into -[MGLMapView setCamera:] that fits the given coordinate bounds, by analogy with -[MKMapView regionThatFits:] or -[MKMapView mapRectThatFits:edgePadding:].

Added mbgl::Map::getCameraOptions() for getting the current camera options more conveniently.
2016-04-22 16:39:25 -07:00
John Firebaugh
5939dd5b41 [core] Use the proper type for font stacks 2016-04-22 15:53:18 -07:00
John Firebaugh
d77e35b686 [test] Run with --gtest_catch_exceptions=0 2016-04-22 15:53:18 -07:00
Minh Nguyễn
1039f21527 [ios, osx] Fixed dangling KVO observer crash
Fixed a crash when deallocating an MGLMapView that has point annotations. Now we explicitly remove all the annotations from the view and thus remove all remaining KVO observers on those annotations.

Fixes #4805.
2016-04-22 15:43:55 -07:00
John Firebaugh
a7527d6986 [build] Depend on directories, so that projects are regenerated when files are added or removed (#4810) 2016-04-22 15:07:57 -07:00
John Firebaugh
0c5d805bf9 [core] FontStack ⇢ GlyphSet (#4803)
A font stack is an array of font names. This is not that.
2016-04-22 13:28:03 -07:00
Minh Nguyễn
9c9ff2d2d4 [ios, osx] Updated build system for jazzy
Consolidated NSValue categories to work around realm/jazzy#539. Documented MGLErrorCode. Moved jazzy configuration file into platform/ios/. Removed redundant include/Mapbox.h that was only being used by jazzy, now that the static frameworks’s umbrella header is based on that of the dynamic framework. Moved framework/Mapbox.h to include/Mapbox.h for consistency.
2016-04-22 12:31:42 -07:00
Minh Nguyễn
2a1a5f0885 [ios, osx] Split MGLDirectionFormatter in two
Split MGLDirectionFormatter into MGLClockDirectionFormatter, which specializes in clock positions, and MGLCompassDirectionFormatter, which boxes the compass. This neatly avoids any confusion that might arise if the developer fails to read the documentation and thinks the original unified formatter can convert between the two types of directions.
2016-04-22 11:29:10 -07:00
Minh Nguyễn
e5c6cfde4b [ios, osx] Direction formatter
Implemented an NSFormatter for formatting CLLocationDirection values as localizable display strings. The formatter supports both absolute compass directions, such as “south”, and relative “clock” directions, such as “6 o’clock”.
2016-04-22 11:13:03 -07:00
Minh Nguyễn
91023f02f8 [ios, osx] Coordinate formatter
Added a degree-minute-second coordinate formatter for general use. Use this formatter in iosapp and osxapp.

Added unit tests for the coordinate formatter and for round-tripping geometry types through NSValue.
2016-04-22 11:13:03 -07:00
Minh Nguyễn
a852ee24fb [ios, osx] Geometry value methods
Added category methods on NSValue for converting to and from the structure types defined in MGLGeometry.h.

Fixes #4485.
2016-04-22 11:13:02 -07:00
John Firebaugh
34a2f142e0 [core] Quarantine style property irregularities in layer classes (#4792)
This moves the *{Layout,Paint}Properties classes closer to code generation.
2016-04-22 10:00:30 -07:00
Cameron Mace
af50f8f9b8 [android] #4624 - changed javadoc wording for ease and animate camera 2016-04-22 11:05:35 -04:00
Cameron Mace
75400836c6 [android] Changed javadoc wording for ease and animate camera
Fixes #4624
2016-04-22 11:04:38 -04:00
Tobrun
c636d5a613 [android] #2835 - limit the amount of object allocations on high traffic code 2016-04-22 13:38:17 +02:00
Minh Nguyễn
aded1b145d Merge branch 'release-ios-v3.2.1' 2016-04-21 21:14:45 -07:00
Minh Nguyễn
9f72d720d9 [ios] Updated changelog for map thread removal 2016-04-21 20:34:26 -07:00
Minh Nguyễn
e404eeae1b [ios] Fixed crash on missing access token
Fixed a race condition in which the access token alert controller would fail to present because the view controller hadn’t yet entered the view hierarchy, plus a downstream crash caused by the access token being missing.
2016-04-21 17:52:16 -07:00
John Firebaugh
ab97e6012c [core] Fix default value for text-max-width
Fixes #4788
2016-04-21 17:23:34 -07:00
John Firebaugh
d4c98cabf3 [core] Make Function constructor explicit 2016-04-21 17:23:15 -07:00
Minh Nguyễn
e898b0a459 [osx] Reset pending min/max zoom levels
Followup to #4789.
2016-04-21 17:05:21 -07:00
Minh Nguyễn
3a22033b90 [ios, osx] Constrain zoom level when selecting offline pack
When selecting an offline pack for display in iosapp or osxapp, constrain the zoom level to the pack’s minimum and maximum zoom levels.

Fixes #4787.
2016-04-21 16:50:45 -07:00