summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLFillStyleLayer.h
Commit message (Collapse)AuthorAgeFilesLines
* [ios] Fix links in documentationNadia Barbosa2019-01-231-5/+5
| | | | | | [ios] Update to docs.mapbox.com Update links
* [ios][documentation] link API documentation to ios-sdk/examplesJosh Erb2018-11-131-0/+9
|
* [core] Implement CrossFadedDataDrivenProperty to add support for feature ↵Molly Lloyd2018-08-311-5/+2
| | | | expressions in `*-pattern` properties
* Merge branch 'release-boba' into masterupstream/fabian-merge-release-4.0.1-masterFabian Guerra2018-05-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # mapbox-gl-js # platform/android/CHANGELOG.md # platform/android/MapboxGLAndroidSDK/gradle.properties # platform/android/gradle/dependencies.gradle # platform/darwin/src/MGLVectorTileSource.mm # platform/darwin/src/MGLVectorTileSource_Private.h # platform/ios/CHANGELOG.md # src/mbgl/style/expression/compound_expression.cpp
| * [ios, macos] Moved numbers away from start of lines in documentation (#11881)Jordan Kiley2018-05-151-1/+1
| |
* | Bump GL JS pin to get tests for global symbol querying.Chris Loer2018-04-251-1/+2
|/ | | | | | - Pulls over an update to line.vertex.glsl (looks like a no-op?) - Add test ignores for collator, is-supported-script, line-gradient - Exclude collator, is-supported-script, line-gradient from code generation.
* [macos] Replaced UIColor with NSColor in documentationMinh Nguyễn2018-04-161-0/+43
|
* [ios, macos] Corrected documentationMinh Nguyễn2018-04-021-3/+4
| | | | Mentioned MGLComputedShapeSource in a few more places. Updated symbol style layer documentation to refer to aftermarket expression functions. Copyedited some heatmap style layer documentation.
* [ios, macos] Renamed MGLVectorSource to MGLVectorTileSourceMinh Nguyễn2018-04-021-2/+2
|
* [ios, macos] Documented ranges of style propertiesMinh Nguyễn2018-01-261-2/+2
|
* Reimplement style values atop NSExpression (#10726)Minh Nguyễn2018-01-241-151/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] Import headers, not implementation files * [core] Added accessors for various expression parameters Added missing parameter accessors to various expression operator classes, as well as a method on InterpolatorBase and Step that enumerates the stops and their values. * [ios, macos] Silenced warning in test of error condition * [ios, macos] Made MGLSphericalPosition boxable * [ios, macos] Implemented array enumeration during conversion * [ios, macos] Temporarily ignore heatmap layer type * [ios, macos] Migrated MGLSymbolStyleLayer.text to NSExpression MGLSymbolStyleLayer.text is now of type NSExpression instead of MGLStyleValue, as a first step toward migrating the entire layer API from style values to expressions. Implemented conversions from NSExpression to JSON arrays and vice versa. The most common NSExpression functions are now converted into style expressions, but not all of the most common style expression operators are supported yet. * [ios, macos] Implemented string coercion * [ios, macos] Color literals * [ios, macos] Null constant expressions * [ios, macos] Convert dictionary literals * [ios, macos] Interpolation expressions * [ios, macos] to-boolean, to-number, get from object * [ios, macos] Variable expressions Implemented custom expression functions for assigning and referring to variables within the context of an expression. Variables are assigned via a “context dictionary” and applied to an subexpression that is given as another argument to the same expression. Also implemented built-in variable expressions for zoom level and heatmap density. * [ios, macos] Convert colors, offsets, padding in expressions to JSON objects * [ios, macos] Expression-based style property getters Implemented a conversion from mbgl::style::PropertyValues to Objective-C JSON objects, which are then converted to NSExpressions. * [ios, macos] Consolidated property value–expression conversion in MGLStyleValueTransformer * [ios, macos] Predicate and expression guide Extracted documentation about predicates from a documentation comment in MGLVectorStyleLayer.h to a new jazzy guide. Added details about NSExpression support as well. Began updating the “For Style Authors” guide to reflect the transition from style values to expressions. * [ios, macos] Updated style authoring guide Updated the Information for Style Authors guide to discuss expressions instead of style functions. Included a table mapping style specification expression operators to NSExpression syntaxes. * [ios, macos] Migrated codegen templates to expressions * [ios, macos] Applied expression changes via codegen Ran make darwin-style-code. * [macos] Migrated macosapp to expressions * [ios, macos] Updated style function guide This guide needs to be thoroughly rewritten, but for now the example code has been migrated to expressions. * [ios, macos] Eviscerated style function tests * [ios, macos] Updated changelogs * [ios] Migrated iosapp to expressions * [ios, macos] Exposed JSON conversion methods publicly * [ios, macos] Removed MGLStyleValue, MGLStyleFunction
* [ios, macos, android] Commit accumulated `make style-code` updatesJohn Firebaugh2018-01-101-2/+2
| | | | Manually ignoring all heatmap and hillshade related changes.
* [darwin] Remove use of NS_DESIGNATED_INITIALIZER from MGLStyleLayer subclassesJohn Firebaugh2017-04-131-1/+1
| | | | It produces compiler warnings for which there seems to be no workaround, and since there's only a single initializer, NS_DESIGNATED_INITIALIZER has little benefit.
* [darwin] Simplify MGLStyleLayer initialization and pointer managementJohn Firebaugh2017-04-131-0/+15
| | | | | | Similarly to the previous commit, introduce `-[MGLStyleLayer initWithPendingLayer:]`, allowing the base class to track the owned `_pendingSource` pointer and implement `-addToMapView:` and `-removeFromMapView:` without any casts. Fixes an issue where `-[MGLStyle layerFromMBGLLayer:]` would wind up creating layers whose `_rawLayer` and `_pendingLayer` held different values.
* [ios, macos] API doc revisions (#8396)Jordan Kiley2017-03-141-1/+1
| | | | | | | | - Changed `make style-code-darwin` to `make darwin-style-code` in relevant files - Added some doc clarifications: - `MGLInterpolationModeExponential` and `MGLInterpolationModeInterval` can be used with `MGLCameraStyleFunction` (I am not sure how to accurately reflect this in the documentation for `MGLCompositeStyleFunction`) - Do not add a style layer to the style property on a map view before the style has finished loading - Create individual style layers from a `MGLShapeCollectionFeature`
* Per-attribute transition properties on MGLStyleLayer (#8225)Fabian Guerra Soto2017-03-101-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] new struct MGLTransition * [ios] MGLTransition struct moved to MGLTypes.h * [ios] MGLTransition implemented for style layer properties * [ios, macos] added support for getting property transitions * [ios, macos] updated to MGLDurationFromTimeInterval and MGLTimeIntervalFromDuration * [ios, macos] added transition properties test * [ios, macos] modified key strings imp * [ios, macos] The impl for transition properties were changed to public methods * [ios, macos] Changelog update * [ios] Fixed layer space formatting * [core] The name space was fixed for getters that returned TransitionOptions * [ios, macos] Added rawLayer transition property tests * [ios] Added a factory method for MGLTransition and transition-related methods to NSValue(MGLAdditions) * [ios, macos] Copyedited changelog blurbs about transition properties
* [ios, macos] Rename MGLStyleConstantValue to MGLConstantStyleValueJesse Bounds2017-03-031-10/+10
|
* [ios, macos] Don't add documentation to NS_ENUMJesse Bounds2017-02-081-112/+94
|
* [ios, macos] Add more bullets to style property docsJason Wray2017-02-081-57/+79
|
* [ios, macos] Add function and interpolation mode to style property docsJesse Bounds2017-02-081-13/+121
|
* [ios, macos] Add support for data-driven property functionsJesse Bounds2017-02-021-19/+19
|
* [core] remove trailing whitespace, add trailing newlines, add space after //Konstantin Käfer2017-01-271-24/+24
|
* Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.7Minh Nguyễn2017-01-161-31/+134
|\
| * [ios, macos] Make MGLMapView.style property nullable (#7664)Minh Nguyễn2017-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * [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.
| * [ios, macos] Cleaned up color, edge insets declarations, commentsMinh Nguyễn2017-01-091-3/+14
| | | | | | | | Eliminated references to MGLColor within style layer headers.
| * [macos] Flip offsets and translationsMinh Nguyễn2017-01-091-3/+19
| | | | | | | | 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.
| * [ios, macos] Fixed links to paint properties in style specMinh Nguyễn2017-01-071-3/+3
| |
| * [ios, macos] -translate → -translationMinh Nguyễn2017-01-071-13/+25
| |
| * [ios, macos] Keep style attribute NSValue categories near enum declarationsMinh Nguyễn2017-01-071-0/+23
| | | | | | | | Eliminated the separate NSValue+MGLStyleLayerAddition files, moving the categories into their respective style layer headers to be closer to the enumeration declarations.
| * [ios, macos] Insert example code in original headers (#7569)Minh Nguyễn2017-01-041-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [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
| * [ios] Add inline examples in documentation (#7337)Eric Wolfe2016-12-211-0/+2
| |
| * [ios, macos] Update and reformat documentation for runtime styling (#7475)Minh Nguyễn2016-12-201-24/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] Optimized changelog for runtime styling Changelog entries related to style JSON now lead off with the analogous portion of the runtime styling API. * [ios, macos] Autolink cross-class property references in docs jazzy can autolink `Class.property` references in documentation comments. * [ios, macos] Removed extra blank lines * [ios, macos] Corrected typo in MGLMultiPoint docs * [ios, macos] Rewrote shape and feature docs Rewrote documentation about MGLShape, its subclasses, and MGLFeature to emphasize runtime styling uses over annotation uses, associate each type with real-world concepts, cross-reference related style layer classes, and cross-reference related or easily confused shape classes. Links to the GeoJSON specification have been updated to RFC 7946. * [ios, macos] Expanded style layer docs With this change, documentation about style layer classes is nominally based on the documentation in the style specification. However, all the existing layer types’ documentation has been overridden to explain what the layer looks like, relate the layer to a real-world concept, and cross-reference related geometry classes. This change also corrects the description of MGLBackgroundStyleLayer, which erroneously stated that the identifier must be “background”, whereas that only happens to be true by default for Studio template styles. * [ios, macos] Wrap style layer docs * [ios, macos] Removed unused code * [ios, macos] Corrected symbol references in docs * [ios, macos] Corrected typo in abstract class exception
* | [build] add -fvisibility=hidden to macOS dynamic framework and export ↵Konstantin Käfer2017-01-041-0/+2
|/ | | | required symbols
* Use appropriate part of speech for properties (#7457)Minh Nguyễn2016-12-161-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] Use appropriate part of speech for properties Fixed overridden property references in requirements lists. Boolean-typed properties can now have getters beginning with “is”. Renamed a number of layout properties according to the following rules: Boolean-typed properties should include a verb; other properties must be noun phrases; all properties must be grammatical. * [ios, macos] Added style spec names as unavailable aliases Renamed properties now have aliases based on their style specification names, marked unavailable, for wayfinding purposes. * [ios, macos] Fixed autosynthesis warnings * [ios, macos] Moved style layer test template to test folder * [ios, macos] Customized iconOptional getter * [ios, macos] Avoid autosynthesis of aliases * [ios, macos] Test that property names are grammatical Run property getter names through a basic battery of tests to see if they’re grammatical. Most part-of-speech tagging tests are guarded by a compile-time flag, off by default, because NSLinguisticTagger does a poor job of telling nouns from verbs, and we’ve intentionally kept many words in property names that could be read as either verbs or nouns (like “transform” or “scale”).
* [ios, macos] rename style spec propertiesFredrik Karlsson2016-11-301-12/+12
|
* [ios, macos] override style spec documentationFredrik Karlsson2016-11-161-3/+3
|
* [ios, macos] Expand changes to entire APIMinh Nguyễn2016-10-171-16/+16
|
* [ios, macos] Refer to style layer class in enum documentationMinh Nguyễn2016-10-111-0/+2
|
* [ios, macos] Simplified style property enum namesMinh Nguyễn2016-10-111-4/+4
| | | | The name of each enumeration type no longer refers to the layer type that uses it.
* [ios, macos] Renamed files to match renamed classesMinh Nguyễn2016-10-061-1/+1
|
* [ios, macos] Revamped MGLStyleLayer, MGLSource inheritanceMinh Nguyễn2016-10-061-13/+1
| | | | | | | | | | Removed the MGLStyleLayer protocol, because almost none of its members was actually implemented in every class that adopted the protocol. Removed the unused mapView backpointer property with no replacement. Renamed MGLBaseStyleLayer to MGLStyleLayer. Created the intermediate abstract classes MGLForegroundStyleLayer and MGLVectorStyleLayer to cover subsets of style layer classes with like functionality. Moved each MGLBaseStyleLayer initializer and the corresponding properties down to an abstract subclass such that the initializer makes sense for all concrete subclasses. Moved more initializers and the predicate property up to MGLVectorStyleLayer to eliminate duplication among the concrete subclasses. Marked these initializers as designated initializers. Removed “source” or “layer” before identifier wherever the type of identifier is apparent. Removed extra MGLGeoJSONSource initializer variants in favor of nullable parameters. Added copious documentation comments for source and style layer classes, including several previously undocumented methods and properties. In particular, some preconditions and postconditions have been documented. Added pragma marks to break up the jazzy documentation pages into sections. Reformatted exceptions for consistency.
* update style generation code for new style spec enum values docs (#6508)Justin R. Miller2016-09-301-4/+13
| | | | | | Documentation for enum values landed in mapbox/mapbox-gl-style-spec#510. This updates Android, iOS, and macOS documentation code gen scripts to capitalize on them.
* [ios, macos] flesh out iOS runtime styling docs (#6466)Justin R. Miller2016-09-271-1/+6
| | | | | | | | - fixes #5959: MGLBaseStyleLayer docs - fixes #5960: MGLSource & subclasses docs - fixes #6467: concrete layer subclass docs - move Core Graphics include - slight code & template cleanups - add ./documentation to git ignores
* [ios, macos] Put MGLStyleLayer inits in respective classesJesse Bounds2016-09-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | Previously, we declared MGLStyleLayer initializers in the MGLStyleLayer protocol as optional methods. This made it easy to opt in and out of initializers that did or or did not make sense for the subclass. However, this approach was dangerous since it was easy for an application developer to initialize an MGLStyleLayer subclass with an init method that was actually not implemented in that class causing an exception at runtime. This commit moves the init methods that each subclass supports to each subclass so xcode (and the compiler) help the developer avoid the previously possible runtime exception. In addition, a new init method is added that takes the source layer and passes that on to `mbgl::style:Layer` (but only on classes where this is possible in core). This allows an application developer to style a specific source layer (i.e. the contour lines of the mapbox terrain vector source). Finally, this refactors MGLStyleLayer classes to use an MGLSource instead of a string identifier for the source when initializing the style.
* [ios] Added support for filters (NSPredicate)Fredrik Karlsson2016-09-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ios, macos] cleaned up filters [ios] added a filter example [ios] utest filters [ios, macos] nested predicates [ios] refactored [ios] filter -> NSPredicate [ios] fixed mbgl::Any/AllFilter -> NSPredicate [ios] translate nested mbgl::NotIn filters [ios] cleanup and added more utests [ios] fixed a bug in the None filter conversion and improved utests [ios, macos] doc [macos] added missing category [ios, macos] additional utests [ios, macos] updated documentation
* [ios, macos] Specialize color properties by platformMinh Nguyễn2016-08-261-1/+12
| | | | Duplicate each color-typed property once per platform using conditional compilation macros. Let’s just hope we never have to throw CGColor into the mix.
* [ios, macos] More specific default value typesMinh Nguyễn2016-08-261-6/+6
| | | | The documentation for runtime style API properties now spells out the value of the default type, to help developers infer the type of the property itself.
* [ios, macos] Mark MGLStyleLayer properties null_resettableMinh Nguyễn2016-08-261-12/+12
| | | | | | If the property is unset, return the default value. Fixes #6126.
* [ios, macos] Distinguish between blackColor and clearColor (#6125)Minh Nguyễn2016-08-241-1/+1
|
* [ios, macos] Copyedit default color property documentation (#6105)Minh Nguyễn2016-08-211-1/+1
| | | | | | | | * [ios, macos] Fixed typo in color property docs * [ios, macos] Predefined colors as default color property values Use {NS,UI}Color.blackColor and {NS,UI}Color.whiteColor as aliases for common default color values.