Commit Graph

9388 Commits

Author SHA1 Message Date
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
Minh Nguyễn
15caf0fd63 [ios, macos] Default to system font for attribution titles 2017-01-14 14:46:15 -08:00
Jason Wray
bc0c8043d2 [ios] Add larger polyline to iosapp test shapes 2017-01-13 15:43:41 -05: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
85fc75db8d [ios, macos] Fixed nilling out predicate 2017-01-12 16:19:14 -08:00
Minh Nguyễn
0a1987f091 Fixed link in “Working with GeoJSON Data” guide 2017-01-12 12:39:15 -08:00
Minh Nguyễn
43c6bb0f24 [ios, macos] Note that MGLShapeSource.shape must be set on main thread (#7687)
* Add Clarification for modifying ShapeCollections

Spinoff task from https://github.com/mapbox/mapbox-gl-native/issues/7622

* update wording for both get/set, remove whitespace
2017-01-12 11:54:07 -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
13243ba26b [ios, macos] Made style-related tests more robust
Removed UIViewController from MGLStyleLayerTests on iOS, because we aren’t really testing integration at that level. Switched to delegate-based expectation fulfillment for both MGLStyleLayerTests and MGLStyleTests, conditionalized on whether the style has already loaded, to avoid race conditions that bleed into other tests.
2017-01-12 08:19:29 -08:00
Jason Wray
4aecb18f54 [ios] Release v3.4.0-beta.7 2017-01-11 20:04:37 -05:00
Jesse Bounds
6ad47cfbad [ios, macos] Add convenience initializers to shape source (#7665)
This adds two new convenience initializers to MGLShapeSource:

-initWithIdentifier:features:options: takes an array of shape objects
that conform to MGLFeature, inserts them in a shape collection feature
and creates a source with that shape. -initWithIdentifier:shapes:options
does the same but with concrete MGLShape objects that get added to
a shape collection.

Throw an exception if an shape source is created with the features
initializer but is sent an array of features that contains something
that is not actually an object that conforms to the feature protocol.

Updates to geojson data guide

Qualify APIs that take arrays of shapes that are features
2017-01-11 16:05:38 -08:00
Jesse Bounds
4332b3b953 Flush telemetry cache when data collection is paused (#7672)
[ios] Flush telemetry cache when data collection is paused

This flushes the cache just before pausing so that data collected
before the pause is not thrown away. It also refactors event
creation to avoid possible nil value inserts into dictionaries
and adds a small optimization to avoid creating immutable
dictionaries to help create mutable ones.

Also:

- Remove cancel API in API client

The cancelAll API is not used. The array of data tasks it maintains
has proven problematic. This removes the API and the problematic
implementation. As safer version of it can be brought back if cancel
task functionality is required in the future.

- Remove unused battery method
2017-01-11 15:55:54 -08:00
Fredrik Karlsson
f1fc9bdfeb [ios] Optional positioning and stickiness for callout view 2017-01-11 15:48:08 -08:00
Minh Nguyễn
57644b2804 [macos] Run style layer tests headlessly (#7684)
* [macos] Run style layer tests headlessly

* [ios, macos] How about a manual expectation?
2017-01-11 15:30:55 -08:00
Jason Wray
71a5453690 [ios] Copy-edit guides (#7680) 2017-01-11 15:47:33 -05: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
b6cf87f5e7 [ios] Require Xcode 8 to build iosapp
Fixes #6873.
2017-01-11 00:22:25 -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
9d55c0f479 [ios, macos] Replace <q> tags with quotation marks in code blocks 2017-01-09 15:51:50 -08:00
Minh Nguyễn
0749659727 [ios, macos] Added MGLShape from GeoJSON example
Added an example of deserializing an MGLShape from a GeoJSON file.
2017-01-09 11:41:05 -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
a4c44c5158 [ios, macos] Cleaned up color, edge insets declarations, comments
Eliminated references to MGLColor within style layer headers.
2017-01-09 01:38:20 -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
2a9f883239 [ios, macos] Document that MGLShape can deserialize GeoJSON (#7638) 2017-01-08 20:22:44 -08:00
Minh Nguyễn
c6e60b8c03 [ios, macos] Test unclusterable shape source shapes 2017-01-08 17:45:18 -08:00
Minh Nguyễn
84f90697df [core] Avoid clustering unclusterable GeoJSON
Ignore empty feature collections or non–feature collections for the purposes of clustering or tiling. A source’s clustering option can only be set when the source is constructed, but setGeoJSON() enables the developer to swap a clusterable feature for an unclusterable geometry and back.
2017-01-08 17:45:18 -08:00
Jesse Bounds
226054bf71 Document requirement about adding sources and layers (#7634)
* [ios, macos] Document requirement about adding sources and layers

Sources and layers added outside of mapView:didFinishLoadingStyle:
and mapViewDidFinishLoadingMap: are not guaranteed to appear
since the map may not be fully loaded and ready to accept new
sources and layers.

This also fixes a compiler warning in iosapp.
2017-01-08 17:08:24 -08:00
Jesse Bounds
4cee2b1a69 [ios, macos] Allow creation of shape collections with no shapes (#7632) 2017-01-08 17:07:06 -08:00
Jesse Bounds
901c806916 [ios] Only use non nil presentationLayers to adjust annotation views (#7626)
Views that are added outside of the viewport do not always have an
instantiated presentationLayer. Attempting to use a nil
presentationLayer to move a view offscreen resulted in the view
being pinned to the left side of the view port (at x == 0).
2017-01-08 12:53:23 -08:00
Minh Nguyễn
d3a2ffe747 [ios, macos] Fixed links to paint properties in style spec 2017-01-07 15:54:08 -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
4700c72e15 [ios, macos] Relaxed sources, layers type
Refined the types of MGLStyle’s sources and layers types so that Objective-C code can easily send messages intended for subclasses of MGLSource or MGLStyleLayer that are contained in one of these containers.
2017-01-05 10:22:10 -08:00
Minh Nguyễn
b6f7d03e5d [ios, macos] Sources, layers properties are immutable
If you need a mutable array of layers, use -mutableArrayValueForKey:.
2017-01-05 10:22:10 -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
Minh Nguyễn
2382f199c1 [ios] Link guides to each other 2017-01-04 21:48:32 -08:00
Eric Wolfe
d2efbc9915 [ios, macos] Move Info.plist keys down in jazzy sidebar 2017-01-04 21:48:32 -08:00
Eric Wolfe
ef9954b566 [ios] Runtime styling guide fixes 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