summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLCompassDirectionFormatter.m
Commit message (Collapse)AuthorAgeFilesLines
* [core] remove trailing whitespace, add trailing newlines, add space after //Konstantin Käfer2017-01-271-10/+10
|
* [ios, osx] Fixed direction formatter edge casesMinh Nguyễn2016-04-241-1/+1
| | | | Fixed an issue causing angles that are multiples of 360°, such as 720°, to be described as 0 o’clock. Fixed a crash when a compass direction is close enough to 360° to round up to 360°.
* [ios, osx] Corrected quarter wind abbreviationsMinh Nguyễn2016-04-241-32/+32
|
* [ios, osx] Made localizable strings unique; unlocalized iosappMinh Nguyễn2016-04-241-64/+64
| | | | | | 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.
* [ios, osx] Corrected clock, coordinate formatsMinh Nguyễn2016-04-241-64/+64
| | | | | | | | 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.
* [ios] Made SDK and iosapp localizableMinh Nguyễn2016-04-241-0/+2
| | | | | | | | | | 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.
* [ios, osx] Split MGLDirectionFormatter in twoMinh Nguyễn2016-04-221-0/+122
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.