Commit Graph

220 Commits

Author SHA1 Message Date
Minh Nguyễn
4eef3df183 [ios, macos] Updated changelogs
Removed a duplicate entry; moved the #7125 entry to the right release; added a blurb about #7937.
2017-02-18 20:49:03 -08:00
Minh Nguyễn
d790132eda [ios, macos] Short-circuit redundant camera changes
Avoid canceling transitions (and triggering preexisting completion handlers) until we get a chance to ensure that a new transition really does have to begin. Consistently avoid mbgl transitions for redundant camera changes. Upon bailing, schedule the completion handler to run asynchronously on a delay equivalent to the requested animation duration.

Added a “functional” equality method to MGLMapCamera that avoids trivial differences.

Fixed invocations of XCTAssertEqualWithAccuracy() that incorrectly expressed the accuracy as a number of digits rather than a scalar tolerance.
2017-02-18 14:14:09 -08:00
Minh Nguyễn
f300a8fedc [macos] Take focus from access token field on close
When closing the Preferences window, take focus away from the Access Token text field to force any changes to be committed.
2017-01-27 09:14:02 -08:00
Minh Nguyễn
e10360f34a [macos] Warn if access token needed but not given
When setting a nil style URL or any mapbox: style URL, if no access token has been provided, log a warning instead of asserting.
2017-01-27 09:14:02 -08:00
Minh Nguyễn
a19ce69455 [macos] Flatten point collections, not multipoints 2017-01-27 09:04:58 -08:00
Konstantin Käfer
042831604b [docs] add changelog entry for #7834
Cherry-picked from be790addb4c7093bacf283708734405be050758a.
2017-01-26 08:01:40 -08:00
Konstantin Käfer
e35c1f8c87 [macos] align HeadlessDisplay with SDK OpenGL context creation options
Cherry-picked from 2a077eaa5483b243e817a328adaea1027a48e7a7.
2017-01-26 08:01:03 -08:00
Konstantin Käfer
b826d043d0 [macos] allow using the integrated GPU on dual-GPU machines
Cherry-picked from e7a7c6be789198a8155dc229ea509dd7aecf4756.
2017-01-26 08:01:03 -08:00
Jason Wray
aa47ed77a6 [ios, macos] Copy-edit changelogs 2017-01-25 22:51:59 -05:00
fabian-guerra
8ac9975941 [ios, macos] Deprecate style class API (#7785) 2017-01-25 22:38:53 -05:00
Minh Nguyễn
1b6a4c60d7 [macos] Distinguish between screens
Fixed an issue causing the mouse cursor to jump after shift- or option-dragging a map view if the window opened on a screen with a different size than the screen with keyboard focus.
2017-01-25 13:33:11 -08:00
Minh Nguyễn
0a8cfdd593 [macos] Refer to Night Shift in style compatibility guide 2017-01-25 13:22:17 -08:00
Minh Nguyễn
35e062d72c [ios, macos] Wrap camera heading (#7724)
* [ios, macos] Fixed negative camera heading when facing northwest

* [ios] Corrected counterclockwise rotation test
2017-01-24 08:29:46 -08:00
Minh Nguyễn
b32c17119e [ios] EdgeInsets is UIEdgeInsets in Swift on iOS 2017-01-23 15:19:48 -08:00
Minh Nguyễn
5a2bb8d240 [ios, macos] Note that canvas sources are unsupported 2017-01-23 15:19:48 -08:00
nitrag
0c95fcfd06 [ios, macos] Document how to avoid gesture recognizer conflicts (#7816)
* Expand on Gesture Implementation

Adding Gesture info as discussed: https://github.com/mapbox/mapbox-gl-native/issues/2278#issuecomment-273685832

Not sure if using codeblocks is kosher.

* Update styling and verbiage

* More updates

* [ios] -requireGestureRecognizerToFail: seems to be enough

* [macos] Added corresponding macOS documentation
2017-01-23 13:17:15 -08:00
Minh Nguyễn
714127eb50 macos-v0.3.0 2017-01-21 11:15:01 -08:00
Minh Nguyễn
5fd740729e [macos] Reorganized readmes
Made the download link easier to find in the installation instructions. Reorganized readmes to link to more related resources. Shout out to OpenStreetMap.
2017-01-21 11:14:15 -08:00
Minh Nguyễn
344cd173ea [macos] Avoid nilling out style URL on load
-awakeFromNib nils out the styleURL property to ensure a style is always present on load. However, if the style URL is specified in the Style URL inspectable, it is set somewhere between -initWithCoder: and -awakeFromNib; nilling out the styleURL property in -awakeFromNib thus resets the style to the default. This change guards against nilling out a non-nil style URL, ensuring that -setStyleURL: is called once and only once on launch.
2017-01-18 10:38:31 -08:00
Minh Nguyễn
2dae2254dd [macos] Check for implementation before calling -toolTip
Also fixed a couple typos in changelogs.
2017-01-16 21:50:08 -08:00
Minh Nguyễn
13b97dd0ce [ios, macos] Correct podspecs, readmes (#7730)
* [macos] RC 1 errata

Synchronized bundled README installation instructions with those in INSTALL.md. Bumped screenshot up a bit. Corrected link to published documentation.

* [ios, macos] Corrected podspec URLs

Fixed podspec linter errors. The podspecs were pointing to unreachable (or soon to be unreachable) screenshot URLs. The -symbols podspecs’ names additionally needed to differ from the normal podspecs’ names.
2017-01-16 10:16:40 -08:00
Minh Nguyễn
4adcdac7b5 [macos] Upgrade macOS deployment and distribution (#7649)
* [macos] Updated deployment scripts

Ported fixes from #6581 and #6740.

* [macos] Acknowledge AppleScript support

* [macos] Prepared for published documentation

Also added link to Dash docset.

* [macos] Added CocoaPods podspecs

Ported from #5653.

* [macos] Rewrote readme; updated screenshot

* [macos] Include setup instructions in standalone docs
2017-01-15 13:18:21 -08:00
Jason Wray
8f6009ea20 [ios, macos] Revert deprecation of alphaForShapeAnnotation: delegate method 2017-01-13 15:43:41 -05:00
Minh Nguyễn
4d5036616f [ios, macos] Rewrote style layer tests
Replaced the style layer integration tests with unit tests. Test conversion of style values to property values and vice versa, not just round-tripping. Test the initial state and null-resetting of each null-resettable property. Test NSValue additions for style attribute enumerations. Test properties common to all style layer classes. Test MGLStyle’s source and layer collections.

Eviscerated implementations of unavailable style layer properties corresponding to style specification properties that were renamed. Implemented corresponding getters to prevent ivars from being autosynthesized for these unavailable properties.

Added a missing bridging header to the iOS test project.
2017-01-13 10:26:43 -08:00
Minh Nguyễn
f1d661ad36 [ios, macos] Document simpler types for style values in Swift 2017-01-12 11:03:20 -08:00
Minh Nguyễn
424c12499c [ios, macos] Make MGLMapView.style property nullable (#7664)
* [ios, macos] Made MGLMapView.style property nullable

MGLMapView’s style property is now nullable (optional in Swift). The property is set to nil while the style loads and in the event that the style has failed to load.

* [ios, macos] Switch to delegate method

* [macos] Create MGLMapView programmatically for layer tests

When MGLMapView is created via a nib, -initWithCoder: is called, causing styleURL to be set to nil, in turn causing the default Streets style to be loaded, fooling MGLStyleLayerTests into thinking one-line has been loaded. Instead, create MGLMapView programmatically, passing the intended style URL into the initializer, preventing Streets from being loaded.
2017-01-11 08:06:20 -08:00
Minh Nguyễn
581fb3849d [ios, macos] Fix miscellaneous static analyzer warnings (#7670)
* [ios, macos] Fixed static analyzer warnings

Fixed static analyzer warnings in MGLNetworkConfiguration, MGLRasterSource, and MGLShape.

* [ios] Fixed static analyzer warnings

Fixed static analyzer warnings in MGLAnnotationImage.

* [macos] Fixed static analyzer warnings

Fixed static analyzer warnings in MGLAnnotationImage and NSImage(MGLAdditions).

* [ios, macos] Two pointer-equal images are object-equal by definition
2017-01-11 03:08:05 -08:00
Minh Nguyễn
13db36c123 [macos] Fixed exception on certain keyboard shortcuts
An implementation of -validateMenuItem: should rarely call the superclass implementation.
2017-01-11 00:00:53 -08:00
Minh Nguyễn
dea1a30332 [ios, macos] Title case attribution buttons
Also added a category method on NSString for title casing the string, plus tests.
2017-01-10 07:56:06 -08:00
Minh Nguyễn
2b61880b57 [macos] Include pitch in shared URL 2017-01-09 09:09:47 -08:00
Minh Nguyễn
e162d4f4c8 Happy new year! 🎉
Cherry-picked from b35deb85bc.
2017-01-09 02:18:52 -08:00
Minh Nguyễn
e0f9870406 [macos] Flip offsets and translations
The screen origin is at the lower-left, so offsets and translations increase rightwards and upwards, in contrast to iOS and Web contexts, where the coordinate system increases rightwards and downwards. Duplicated style layer property declarations to reflect this difference.
2017-01-09 01:38:20 -08:00
Minh Nguyễn
a5e43f0272 [ios, macos] Note reversed order in NS/UIEdgeInsets 2017-01-09 01:38:20 -08:00
Minh Nguyễn
1ae84db978 [ios, macos] Clarified CGVector, NS/UIEdgeInsets accessors 2017-01-09 01:38:20 -08:00
Jesse Bounds
4cee2b1a69 [ios, macos] Allow creation of shape collections with no shapes (#7632) 2017-01-08 17:07:06 -08:00
Minh Nguyễn
bf8d037fca [ios, macos] -translate → -translation 2017-01-07 15:47:31 -08:00
Minh Nguyễn
17b3ec1edd [ios, macos] Renamed text-field, text-font, text-font-size, circle-pitch-scale
Reduced the likelihood that the developer might attempt to set textField to an NSTextField or UITextField, or textFont to an NSFont or UIFont, or textSize to a CGSize or NSSize, or circlePitchScale to a number (given iconScale).
2017-01-07 15:46:53 -08:00
Minh Nguyễn
d5d6bcee0f [ios, macos] Keep style attribute NSValue categories near enum declarations
Eliminated the separate NSValue+MGLStyleLayerAddition files, moving the categories into their respective style layer headers to be closer to the enumeration declarations.
2017-01-07 14:37:53 -08:00
Minh Nguyễn
80df3090ec [ios, macos] Split NSValue+MGLStyleEnumAttributeAdditions category per style layer type
Also renamed the file to have a slightly more wieldy name.
2017-01-07 14:37:53 -08:00
Minh Nguyễn
428c0fdf70 [macos] Arrange layers top to bottom in sidebar
Implemented a reversedLayers property on MGLStyle based on the layers property.
2017-01-06 07:47:43 -08:00
Minh Nguyễn
188a61af55 [macos] Fixed changelog parsing
Updated changelog parsing code to handle subheadings within release notes.
2017-01-05 08:13:13 -08:00
Eric Wolfe
d2efbc9915 [ios, macos] Move Info.plist keys down in jazzy sidebar 2017-01-04 21:48:32 -08:00
Minh Nguyễn
a1bea12444 [ios, macos] Split For Style Authors guide
Information for Style Authors is now two separate guides, one for iOS and one for macOS. Both are compiled from the same template. Added language about rotation, tilting, and printing.
2017-01-04 21:48:24 -08:00
Minh Nguyễn
7e120e32b8 [ios, macos] Added guide for style authors
Added a guide to orient JSON stylesheet authors and Mapbox Studio users around the runtime styling API. An introductory section details the many considerations for designing a robust style for use with iOS and macOS devices.
2017-01-04 21:46:25 -08:00
Minh Nguyễn
0fac9d5674 [ios, macos] Added guide for working with GeoJSON 2017-01-04 21:39:08 -08:00
Minh Nguyễn
50ae3eb3c0 [ios, macos] Insert example code in original headers (#7569)
* [ios, macos] Removed extraneous code fences

* [ios] Streamlined example delimiters

Use test method names as names of example blocks and test method documentation comments as front matter for examples. Set off example blocks using a syntax similar to playground markup syntax. Avoid hard-coding indentation levels. Trigger Xcode build error when an error occurs in the script.

* [ios] Removed platform-specific code from examples

* [ios] Fixed logic error

The comment said 200 while the code said 1,500.

* [ios] Formalize build phase input

* [ios] Insert examples into original source documentation

Rewrote the example code insertion script to work on the original source files and overwrite any existing code examples on the same symbols. The script uses SourceKitten to find the documentation comment for the symbol named by the test method.

Replaced the Run Script build phase that runs the example code insertion script with a make rule that runs the same script. Inlined skeleton examples minus the contents of the code blocks.

* [ios] Fixed syntax error

* [ios] Ran ios-add-examples-to-docs

* [ios] Avoid touching unchanged headers

* [ios] Refactored example insertion script

* [ios] Point jazzy at original sources

* [ios] Invoke SourceKitten only once

* [ios] Look for methods as well as properties

* [ios] Thoroughly search for code blocks in doc comments

Refactored the example code insertion script to index test methods by their names, then recursively search the SourceKitten output for documentation comments that contain Swift code blocks, replacing each code block with the associated test method body.

* [ios, macos] Enabled example insertion for macOS

The example code insertion script is now platform-agnostic.

* [ios, macos] Fixed documentation example tests

Set the map view’s style to a minimal local JSON file. Wait for the style to finish loading before running each test. Corrected CGVector type.

* [ios, macos] Dry run mode

The output of this mode isn’t a good indicator of whether any files would’ve needed to be changed, because the presence of a conditional compilation block in one of the test methods means this script would always change and revert the corresponding comment.

* [ios] Fixed test failure

The iOS implementation of MGLMapView tries to show the Streets style by default even if no access token has been set. Avoid a race condition and frequent test failure by specifying the minimal style on initialization.

* [ios, macos] Ensure SourceKitten is installed before inserting example code

* [ios, macos] Tear down map view after each test

Keep map views from previous tests from hanging around, potentially obscuring the result of a subsequent test. Set the access token to a bogus token upfront for all style layer tests. Unified MGLStyle usage within MGLStyleTests.

* [ios, macos] Reinsert examples after generating runtime styling headers
2017-01-04 12:19:31 -08:00
Minh Nguyễn
e6132d248b [ios, macos] Rewrote predicate/filter conversion
When converting predicates to filters, symmetric comparison predicates can now compare a value to a key in addition to the usual key-to-value order. Added error checking for unhandled combinations like key-to-key. Fixed a crash converting a CONTAINS predicate into a filter. Added support for constant value expressions inside aggregate expressions. Allow sets as aggregate expressions just like arrays, except in BETWEEN predicates where order matters. Flatten NOT predicates into more specialized filters.

When converting filters to predicates, use constant value expressions inside aggregate expressions. Convert to a BETWEEN predicate when possible.

Replaced predicate round-tripping integration tests with systematic unit tests for converting in either direction, plus unit tests for round-tripping and symmetry.

Refined exception names and messages. Realphabetized files in groups.
2017-01-04 08:52:41 -08:00
Minh Nguyễn
d35f235dae [ios, macos] Aliased MGLMultiPointFeature to MGLPointCollectionFeature 2017-01-02 12:34:39 -08:00
Minh Nguyễn
a66b1f7599 [ios, macos] Fixed iosbench build
Fixed a stale include in iosbench. MGLMapView(Private) forward-declares mbgl::Map instead of including mbgl.hpp, which iosbench has no access to.
2016-12-23 15:17:03 -08:00
Minh Nguyễn
077cbb5e4b [ios, macos] Updated changelogs 2016-12-23 03:09:09 -08:00