summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyleLayer.mm.ejs
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'release-boba' into masterupstream/fabian-merge-release-4.0.1-masterFabian Guerra2018-05-171-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | # 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
| * [core] Convert "legacy" filters directly into expressions (#11610)Lucas Wojciechowski2018-05-101-1/+1
| | | | | | Ports the specialized filter-* expressions from GL JS, adding them to src/mbgl/style/expression/compound_expression.cpp
| * [ios, macos] Make NSPredicate+MGLAdditions public. (#11810)android-v6.1.0Fabian Guerra Soto2018-05-041-1/+1
| |
* | [core] Rework spec function/expression taxonomyLauren Budorick2018-05-141-4/+8
|/ | | Ports https://github.com/mapbox/mapbox-gl-js/pull/6521, updating codegen scripts to parse new expression taxonomy.
* Localize expressions more thoroughly (#11651)Minh Nguyễn2018-04-161-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios] Removed changelog entry for Terrarium The broader feature is new to v4.0.0 as well. * [ios, macos] Localize expressions more thoroughly Replaced the MGLStyle.localizesLabels property with a -localizeLabelsIntoLocale: method that allows the caller to specify the locale to localize into. Also exposed a per-expression localization method for developers who want to vary behavior from layer to layer. * [macos] Offer English labels if preferred language is unsupported * [ios, macos] Removed dead code * [ios] Use new localization method in iosapp * [ios, macos] Fixed local name labels * [ios, macos] Convert tokens to key path expressions in stop dictionaries * [ios, macos] Streamlined token upgrading Separated token upgrading into a separate process that only happens as part of the MGLSymbolStyleLayer.text and MGLSymbolStyleLayer.iconImageName properties’ getters, so that it’s easy to remove later when mbgl changes obviate this workaround. Removed the replacesTokens parameter to the expression localization methods. * [ios, macos] Preserve whitespace between tokens * [ios, macos] Moved token replacement to a consistent category Fixed a build warning. * [ios, macos] Replace tokens in all string-typed getters For consistency, replace tokens with key paths in all string-typed style paint and layout properties. * [ios, macos] Test token replacement Added tests for replacement of tokens with key paths in expressions. Fixed token replacement for raw strings in stop dictionaries. Avoid sticking a single string inside an mgl_join: call. * [ios, macos] Test token replacement, localization Added unit tests of token replacement and localization of expressions. Only NSExpression is responsible for resolving the preferred language now, since NSLocale tends to tack a region code onto the locale identifier and the NSExpression method can be called independently anyways. Added a private variation of +[MGLVectorTileSource preferredMapboxStreetsLanguage] that takes an array of preferred languages. Fixed localization of non-expressions in stop dictionaries. * [ios, macos] Dictionary keys aren’t necessarily zoom levels
* [core, ios, macos, android, node] Heatmap layer (#11046)Vladimir Agafonkin2018-02-151-1/+3
| | | | | Co-Authored-By: Konstantin Käfer <mail@kkaefer.com> Co-Authored-By: Anand Thakker <anandthakker@users.noreply.github.com> Co-Authored-By: Minh Nguyễn <1ec5@users.noreply.github.com>
* [ios, macos] Hook up hillshade style layers, raster DEM sources to iOS/macOS ↵Minh Nguyễn2018-01-251-1/+1
| | | | | | | | | | | | | | | | (#11036) * [ios, macos] Finished implementing MGLHillshadeStyleLayer * [macos] Added icon for hillshade layer Also set the background layer icon to mirror in right-to-left locales. * [ios, macos] Implemented raster DEM source * [macos] Added Enhance Terrain debugging command * [ios, macos] Simplified raster DEM source example
* Reimplement style values atop NSExpression (#10726)Minh Nguyễn2018-01-241-56/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [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
* [darwin] Make -[MGLForegroundStyleLayer sourceIdentifier] abstractJohn Firebaugh2017-04-131-2/+1
| | | | It's already overridden by concrete subclasses, and by making it abstract we enable the removal of the private MGLForegroundStyleLayer category.
* [darwin] Simplify MGLStyleLayer initialization and pointer managementJohn Firebaugh2017-04-131-63/+7
| | | | | | 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.
* Per-attribute transition properties on MGLStyleLayer (#8225)Fabian Guerra Soto2017-03-101-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [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] Simplify implementation of layer removal from map viewJesse Bounds2017-02-231-7/+4
| | | | | | | | | | | This reverts a previous change that recreated the pending and raw layer pointers if an identifier match caused a layer to be removed but the removed layer was of a different type than the layer triggering the removal This refactors the pointer replacement to use a simpler solution that returns early if the layer does not have a raw pointer loaded in the mbgl map instance.
* [ios, macos] Recreate pending and raw layer ref when layer is removedJesse Bounds2017-02-231-3/+7
|
* [core] Enable property functions for text-{field,transform} (#7944)Anand Thakker2017-02-171-2/+2
|
* [ios, macos] Add support for data-driven property functionsJesse Bounds2017-02-021-8/+44
|
* [core] remove trailing whitespace, add trailing newlines, add space after //Konstantin Käfer2017-01-271-2/+2
|
* Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.7Minh Nguyễn2017-01-161-14/+44
|\
| * [ios, macos] Rewrote style layer testsMinh Nguyễn2017-01-131-8/+10
| | | | | | | | | | | | | | | | 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.
| * [ios, macos] Fixed nilling out predicateMinh Nguyễn2017-01-121-2/+2
| |
| * [ios, macos] Keep style attribute NSValue categories near enum declarationsMinh Nguyễn2017-01-071-2/+20
| | | | | | | | Eliminated the separate NSValue+MGLStyleLayerAddition files, moving the categories into their respective style layer headers to be closer to the enumeration declarations.
| * Implement MGLForegroundStyleLayer.sourceIdentifier (#7570)Fredrik Karlsson2017-01-031-2/+10
| | | | | | | | | | | | * [ios, macos] sourceIdentifier accessor methods * [ios, macos] generate style code
* | Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.5-masterMinh Nguyễn2016-12-201-31/+54
|\ \ | |/ | | | | Also reran make style-code and manually discarded anything related to fill extrusion layers.
| * Use appropriate part of speech for properties (#7457)Minh Nguyễn2016-12-161-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [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] Simplify MGLSource and subclasses (#7377)Minh Nguyễn2016-12-131-15/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] Audited source headers for nullability * [macos] Made MGLTileSet public * [ios, macos] Replaced MGLTileSet with MGLTileSource MGLRasterSource and MGLVectorSource now share a common abstract superclass, MGLTileSource. MGLTileSet has been removed. MGLTileSource is modeled after mbgl::style::RasterSource and mbgl::style::VectorSource. It has initializers that incorporate the parameters of MGLTileSet’s initializers, but it lacks getters for everything but the attribution string. MGLTileSet’s properties have been converted into options that can be passed into MGLTileSource’s initializers in a dictionary. Properly implement rawSource as a covariant property so that it doesn’t end up getting autosynthesized as a shadow ivar. This prevents concrete subclasses of MGLSource from setting _rawSource directly but getting a different value out of self.rawSource. Marked -[MGLSource init] as unavailable and ensured that concrete subclasses of MGLSource have the right set of initializers marked as designated initializers. Documentation comments for each concrete source class identify the corresponding source type in the style specification. Clarified the purpose of MGLTileSetScheme, now known as MGLTileCoordinateSystem. * [ios, macos] Clarified tile size interpretation Sticking to a default value of 256 for mapbox: URLs, but other URLs get the standard 512 value. * [ios, macos] rawSource is always set * [ios, macos] Cleaned up MGLShapeSource initialization rawSource is never nil, so there’s no need for a -commonInit method. Extracted -geoJSONOptions from MGLShapeSource into a standalone function for easier testing. * [ios, macos] Synchronized headers in project Realphabetized headers in groups. Added headers missing from one project or the other. * [ios, macos] Added MGLShape methods to (de)serialize GeoJSON data Added a class initializer and instance method to MGLShape that deserialize and serialize the shape as GeoJSON data, respectively. The new initializer handles parsing errors gracefully. Removed methods specific to GeoJSON data from MGLShapeSource, in an effort to reduce parallel state. Developers are now expected to go through the new MGLShape initializer to get an MGLShape representation. Alternatively, a local file URL can be passed into the other MGLShapeSource initializer. * [ios, macos] Typo in assertion message * [ios, macos] Simplified GeoJSON serialization Every MGLShape now knows its most specific mbgl::GeoJSON representation. * [ios, macos] Reremoved MGLFeaturePrivate mbgl::GeoJSON, which is a variant, allows a single GeoJSON representation method to traffic in whatever type is needed for a particular shape class. This change removes some hidden private protocols, which are a bug waiting to happen. * [ios, macos] Fixed covariant rawLayer property Properly implement rawLayer as a covariant property so that it doesn’t end up getting autosynthesized as a shadow ivar. This prevents concrete subclasses of MGLStyleLayer from setting _rawLayer directly but getting a different value out of self.rawLayer. * [ios, macos] Use MGLAttributionInfo for source attribution Made MGLAttributionInfo public. Replaced MGLTileSource’s attribution property with an attributionInfos property set to an array of MGLAttributionInfo objects. Added an MGLTileSourceOption for specifying an array of MGLAttributionInfo objects instead of an HTML string (either is acceptable when creating an MGLTileSource). * [ios, macos] Corrected method references in documentation
| * [ios, macos] Migrate MGLCustomStyleLayerAdditions to style layer API (#7250)Minh Nguyễn2016-12-071-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] Replaced custom style layer API with MGLOpenGLStyleLayer Replaced the custom style layer API on MGLMapView with an equally unsupported MGLOpenGLStyleLayer API that nonetheless is consistent with the broader runtime styling API and is compatible with macOS. Fixed an unrecognized selector crash when wrapping a layer of unrecognized type coming from mbgl. * [macos] Added lime green layer demo to macosapp Reprised the demo removed from iosapp in #5091. * [ios, macos] Rationalized MGLOpenGLStyleLayer API MGLStyle now strongly references any MGLOpenGLStyleLayer object that’s added to it, in order to prevent pointers from going stale and make it easy for layer drawing code to get more information about the map view. Replaced the MGLOpenGLStyleLayer callback blocks with overridable instance methods. Added internal documentation for each method. Subclassed MGLOpenGLStyleLayer as LimeGreenStyleLayer inside macosapp. Consolidated -addToMapView: into -addToMapView:belowLayer: to ensure that MGLRedundantLayerException gets raised even if the layer is being inserted rather than added to the bottom of the stack. * [core] Clarified that rendering happens on the main thread * [ios, macos] Fixed removing and re-adding MGLOpenGLStyleLayer Don’t allow index-based layer removal to circumvent -removeFromMapView:, which MGLOpenGLStyleLayer relies on to synchronize the style’s array of MGLOpenGLStyleLayers. When obtaining an MGLOpenGLStyleLayer, get the instance already added to the style instead of creating a new one to wrap the underlying CustomLayer.
* | [darwin, android] SDK bindings for circle-stroke propertiesJohn Firebaugh2016-12-091-1/+1
|/
* [ios, macos] Raise NSException if layer or source added more than onceJesse Bounds2016-12-021-0/+6
| | | | | | | | | | | | | | When MGLSource and MGLLayer instances are added to the style, they lose ownership of their std::unique_ptr<T> after it is moved to the mbgl level. Subsequent attempts to add such instances result in a C++ exception. This adds logic in the Darwin platform to raise a NSException if the source and layer addToMapView methods are called more than once and the pointer is invalid. In addition, the documentation in MGLStyle for addSource: and addLayer: has been update to warn developers to avoid adding the same instance twice and, for that matter, instances with the same identifier.
* [ios, macos] Avoid unsafe cast when removing style layers (#7227)Jesse Bounds2016-11-301-1/+28
| | | | | | | | | | | | | | | | | | This updates the code generation for style layers to add a test to check that the style object returned from mbgl can be safely cast into the expected type so ownership can be returned to the caller when removing layers. This scenario was previously possible if a layer of type T was added before a layer of type U but both layers shared the same identifier. In that case, if the pointer to the second layer of type U was used to remove a layer, a runtime exception would occur since mbgl returns the layer with type T (the first one added). Now, an exception will still occur if layers with the same identifier are manipulated as described above but it is done as part of a validation check for all public style layer methods at the Darwin platform level. The NSException attempts to warn developers about using and reusing style identifiers to avoid this issue in the first place.
* [ios, macos] rename style spec propertiesFredrik Karlsson2016-11-301-14/+14
|
* [core, ios, macos] Added layers and sources properties to MGLStyleMinh Nguyễn2016-11-281-0/+3
| | | | | | | | Added new layers and sources properties to MGLStyle that contain all the style’s layers and sources, respectively. These properties are KVC-compliant with all the mutable to-many methods. Layers are ordered from topmost to bottommost, for consistency with Cocoa APIs where front/first means top and back/last means bottom. Also added storage for mbgl::style::Source in MGLSource proper for wrapping AnnotationSource. Until the style finishes loading, its name property is set to nil. Fixes #6003.
* [ios, macos] Remove unused `MGLGeometryAdditions` category stubJesse Bounds2016-11-221-9/+2
| | | | | This fixes an issue where the documentation for all NSValue categories were described as `MGLGeometryAdditions`.
* [ios, macos] Refactor runtime styling enumeration propertiesJesse Bounds2016-11-221-15/+66
| | | | | | | Correctly map SDK runtime styling enumerations to mbgl equivalents. Also, add category methods to NSValue so enums can be wrapped up with less of the details of how they are layed out in memory in Objective-C.
* [ios, macos] Take back source and layer ownership on removal (#7048)Jesse Bounds2016-11-141-17/+25
| | | | | If a source or layer is removed from the style, recapture the unique pointer ownership. This makes it safe to add back sources and layers after they have been removed.
* [ios, macos] Layer ownership refactor (#6904)fabian-guerra2016-11-041-11/+39
| | | `MGLStyleLayer` was updated to support a raw pointer to the mbgl object, which is always initialized, either to the value returned by `mbgl::Map getLayer`, or for independently created objects, to the pointer value held in `pendingLayer`. In the latter case, this raw pointer value stays even after ownership of the object is transferred via `mbgl::Map addLayer`.
* [ios, macos] Expand changes to entire APIMinh Nguyễn2016-10-171-9/+13
|
* [ios, macos] Revamped MGLStyleLayer, MGLSource inheritanceMinh Nguyễn2016-10-061-26/+16
| | | | | | | | | | 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.
* [ios, macos] Put MGLStyleLayer inits in respective classesJesse Bounds2016-09-081-2/+29
| | | | | | | | | | | | | | | | | | | | | | | 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.
* [core, ios, android, qt] Observe style layer mutations rather than requiring ↵John Firebaugh2016-09-061-1/+1
| | | | | | SDKs to use Map::update This paves the way for updates to filter and layout properties to trigger a source reload, without each SDK having to participate in the implementation.
* [ios] Added support for filters (NSPredicate)Fredrik Karlsson2016-09-021-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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] Renamed Objective-C++ headers to .hMinh Nguyễn2016-08-161-2/+2
| | | | | | Also removed a redundant reference to MGLStyle_Private.h in ios.xcodeproj. Fixes #5952.
* fixes #5957: automatically call update() for iOS runtime style APIJustin R. Miller2016-08-161-0/+1
|
* Runtime styling API for iOS/macOS (#5727)Fredrik Karlsson2016-08-111-0/+64
* [ios] wip runtime styling * [ios, macos] Outlined header templates * [ios, macos] cleanup and use appropiate data types * [ios, macos] removed refs to mbgl and added convenient color methods on UIColor and NSColor * [ios, macos] updated header template, included doc string * [ios, macos] outlined template for layer implementation files * [ios, macos] moved script to platform/darwin and updated comments * [ios, macos] Cleaned up the implementation template * [ios, macos] removed unused function and added support for more datatypes * [ios, macos] overhauling the type protocols * [ios, macos] removed unnecessary style classes * [ios, macos] added support for more types * [ios, macos] fixed string and number prop values * [ios, macos] enum getters * [ios, macos] added removeLayer() and removed unused layer ref * [ios, macos] fixed remaining layer types and converted style layer into a protocol * [ios, macos] fixed addLayer() and added example for line layer * [ios] GeoJSON source now works * [ios] fixed raster layer and raster source * [ios] fixed attr prop number and outlined prop function * [ios] wip functions * [ios] bool and float function fix * [ios] cleanup * [macos] fixed support for macos * [ios] fixed string functions * [ios] extended array functions * [ios] added tests and fixed a few bugs * [ios] less verbose functions and improved tests * [ios, macos] Removed unnecessary use of default arguments Default arguments aren’t supported in Node v4, and they aren’t needed here anyways, because we’re only testing for truthiness. * [ios, macos] Enum setters Rely on a macro instead of category methods to specialize the setter implementation for enum attributes, since generic types are disallowed in Objective-C method signatures and mbgl::style::PropertyType must be type-qualified. * [ios, macos] Got macOS closer to parity w/ iOS Added various classes and test classes to the macOS workspace. Also fixed lots of compiler errors and updated macosapp runtime styling example to use the new dictionary syntax for function stops. Updated all conversions from Objective-C stops to C++ stops to enumerate over the dictionary. Fixed compiler errors in enum setter implementations. Also corrected path to script in generated file comments. * [ios, macos] Added EJS templates to project * [ios, macos] Code formatting Made code format more consistent. * [ios, macos] Spelled out ID Cocoa convention is to always spell out “ID” as “identifier”, in part to avoid confusion with the id keyword. Also, URL is capitalized in most contexts, including property names. * [ios, macos] Grouped related headers together * [ios, macos] Cleaned up layer transformation Also added support for converting background layers into Objective-C. * [ios, macos] Cleaned up tests Also made the tests work on macOS by introducing a new window to host the map. * [ios, macos] Replaced TODOs with #warnings * [ios] convert array based property values * [ios, macos] color function/undefined getter * [ios, macos] fixed function/undefined getters for bool and float properties * [ios, macos] more function/undefined property getters * [ios, macos] more type conversion and cleanup * [ios, macos] disable macos runtime styling tests for now * [ios, macos] cleaned up style code script * [ios, macos] more type conversion * [ios] added a base layer to handle visibility min/max zoom * [macos] fixed base layer * [ios, macos] use accessor methods * [ios, macos] cleanup * [ios, macos] add geojson to ios and macos * [macos] rebase fix * [ios, macos] fixed enum getters and added tests for enums * [ios, macos] added an update method to base layer * [ios, macos] added some documentation * [ios, macos] docs * [ios, macos] removed refs to filters for now * [ios, macos] various tail work * [ios, macos] missing import and incorrect type