Commit Graph

108 Commits

Author SHA1 Message Date
Fabian Guerra Soto
1d7b243a06 [ios, macos] Support expressions in formatting parameters. (#14198)
Modified MGLAttributedExpression object to support NSExpressions as formatting attributes only. This aligns with GL and Android implementation and specification.

Modified the documentation accordingly, and changed MGLFontSizeAttribute to MGLFontScaleAttribute to clarify the true function of the formatting parameter.
2019-03-22 13:45:39 -07:00
Fabian Guerra Soto
174c8fa7e4 [ios, macos] Add text-color support to format expressions. (#14146)
Added the possibility of overriding paint properties inside the format expression.

Added an example of how to create an MGLAttributedExpression object and documented the attributes keys and value types.

Fixed a bug that ignored the font names.
2019-03-19 14:53:35 -07:00
Fabian Guerra Soto
7939ff213a [ios, macos] Add format expression convenience methods support. (#14094)
Added the ios/macos format expression bindings.

The equivalent is mgl_attributed: or mgl_attributed({}) when making an expression using the expressionForFormat selector.

A new constructor called mgl_expressionForAttributedExpressions:(NSArray<NSExpression*>*)attributedExpressions was added to NSExpression+MGLAdditions category.

Updated the symbol style layer text test to use the bindings.

Updated the Predicates and Expressions.md and For Style Authors.md.ejs template with the bindings.
2019-03-15 16:10:27 -07:00
Nadia Barbosa
332c1ac96a [ios] Fix links in documentation
[ios] Update to docs.mapbox.com

Update links
2019-01-23 13:16:28 -08:00
Bruno de Oliveira Abinader
e64c28613a [core] Support fill-extrusion-vertical-gradient 2018-11-29 14:23:55 +02:00
Julian Rex
cca37e765b Updated Info.plist docs. (#13436) 2018-11-26 14:31:28 -05:00
Minh Nguyễn
3f314682fa [ios, macos] Added $lineProgress expression variable 2018-10-30 14:26:59 -07:00
Minh Nguyễn
a0ebd61929 [ios, macos] Fixed typo in style authors guide 2018-10-30 14:26:59 -07:00
Fabian Guerra Soto
57837443bb [ios, macos] Add crossSourceCollissions property. (#12941)
* [ios, macos] Add crossSourceCollissions property.

* [ios, macos] Add perSourceCollisions property.

* [ios, macos] Update changelogs.
2018-09-26 15:17:30 -07:00
Minh Nguyễn
65ae97613e [ios, macos] Fixed typo in style authors guide 2018-08-29 13:49:07 -07:00
Jason Wray
5e213d0db1 [ios, build] Improve jazzy readme generation
- Include changelogs for all releases in the current semver minor series.
- Use template for jazzy readme.
2018-08-22 13:05:49 -04:00
Mikhail Pozdnyakov
5ce64b786c [ios, macos] Introduce MGLShapeSourceOptionLineDistanceMetrics
Exposes access to
https://www.mapbox.com/mapbox-gl-js/style-spec/#sources-geojson-lineMetrics
2018-08-21 13:49:35 +03:00
Nadia Barbosa
41169403a2 Rename link title 2018-08-14 16:38:38 -07:00
Nadia Barbosa
66a09b924f Fix line break 2018-08-14 16:38:38 -07:00
Nadia Barbosa
b8a1b13420 Fix typo 2018-08-14 16:38:38 -07:00
Nadia Barbosa
bee605e063 Edit link 2018-08-14 16:38:38 -07:00
Nadia Barbosa
4b9ed3837a [ios] Remove duplicated guides 2018-08-14 16:38:38 -07:00
Minh Nguyễn
f11ab91fc4 [ios, macos] Convert predicate options to collators 2018-07-09 16:02:40 -07:00
Molly Lloyd
e1af62e87d [core] add raster-resampling property (#12176)
* update style-code for raster-resampling

* implement user-defined raster-resampling

* invert filter condition

* raster-resampling -> raster-resampling-mode for darwin language conventions
2018-06-21 14:37:17 -07:00
Fabian Guerra
30376f3ce1 Merge branch 'release-boba' into master
# 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
2018-05-17 11:47:31 -04:00
Fabian Guerra Soto
a425995189 [ios, macos] Add to-rgba expression operator. (#11725)
* [ios, macos] Add expression support to to-rgba operator.

* [ios, macos] Update style docs.

* [ios, macos] Refactored to-rgba to to-color.

* [ios, macos] Add support for to-rgba expression operator.

* [ios, macos] Add multiple parameters support to to-color operand.

* [ios, macos] Enable to-rgba operator for MGLColor or key path expressions.

* [ios, macos] Update predicates and expressions guide to reflect cast changes.

* [ios, macos] Update changelogs.

* [ios, macos] Clarify color casting usage.
2018-05-07 12:01:29 -04:00
Fabian Guerra Soto
844a824409 [ios, macos] Fix broken link to predicates and expressions guide. (#11818) 2018-05-03 09:11:42 -04:00
Jason Wray
c067865e7b [ios, macos] Update minimum deployment versions to iOS 9, macOS 10.11 (#11776)
* [ios] Remove iOS 8 conditionals

* [ios, macos] Bump pod deployment targets

* [ios, macos] Add changelog entries

* [ios, macos] Update docs

* Remove unnecessary selector-based version checks

* Update SQLite note

* [ios, macos] Replace lightweight generics macros with direct use
   Lightweight generics for Foundation collections are available everywhere with the bump to iOS 9 and macOS 10.11.

* Update deprecated macOS method
2018-04-27 12:25:49 -04:00
Fabian Guerra Soto
a45670cfb5 [ios, macos] Rename featureProperties to featureAttributes. (#11748)
* [ios, macos] Rename featureProperties to featureAttributes.

* [ios, macos] Update style documentation.

* [ios, macos] Remove featureProperties variable tests.

* [ios, macos] Update the changelogs.
2018-04-23 09:05:36 -04:00
Jordan Kiley
f81f770741 [ios, macos] Update Style Functions guide (#11724) 2018-04-19 18:43:04 -07:00
Fabian Guerra Soto
a6c02adeb6 [ios, macos] Add trigonometric support to NSExpression. (#11716)
* [ios, macos] Add acos NSExpresssion operator.

* [ios, macos] Add asin NSExpresssion operator.

* [ios, macos] Add atan NSExpresssion operator.

* [ios, macos] Add cosine NSExpresssion operator.

* [ios, macos] Add sine NSExpresssion operator.

* [ios, macos] Add tangent NSExpresssion operator.

* [ios, macos] Add log2 NSExpresssion operator.

* [ios, macos] Update style authors documentation.
2018-04-17 18:23:35 -04:00
Fabian Guerra Soto
cec46070c6 [ios, macos] Add NSExpression convenience constructors and helper methods. (#11278)
* [ios, macos] Refactor convinience expression initializers.

# Conflicts:
#	platform/darwin/src/NSExpression+MGLAdditions.h
#	platform/darwin/src/NSExpression+MGLAdditions.mm
#	platform/ios/app/MBXViewController.m

* [ios, macos] Add MGL_MATCH convenience method.

# Conflicts:
#	platform/darwin/src/NSExpression+MGLAdditions.h
#	platform/darwin/src/NSExpression+MGLAdditions.mm
#	platform/darwin/test/MGLExpressionTests.mm

* [ios, macos] Add Swift friendly convenience methods name syntax..

# Conflicts:
#	platform/darwin/src/NSExpression+MGLAdditions.h

* [ios, macos] Update runtime styling examples.

# Conflicts:
#	platform/ios/app/MBXViewController.m

* [ios, macos] Add NSExpression variable expressions properties.

* [ios, macos] Clarify convenience initializer names.

* [ios, macos] Update Style Authors guides.

* [ios, macos] Fix cherry-pick merge.

* [ios, macos] Update convenience initializers documentation.
2018-04-16 20:48:04 -04:00
Jason Wray
d4e597eb94 [ios, macos] Convert various class methods to class properties
This improves the Swift interface while having no effect on Obj-C usage.
2018-04-16 18:42:34 -04:00
Fabian Guerra Soto
fe4348eec3 [ios, macos] Remove mgl_ prefix from built-in expressions variables. (#11689) 2018-04-16 13:39:10 -04:00
Nadia Barbosa
582d0e5885 Minor last fixes 2018-04-12 14:54:12 -07:00
Jason Wray
6a631855d3 Compress the compressed compression 2018-04-12 14:54:12 -07:00
Nadia Barbosa
af05ccad52 Redo images 2018-04-12 14:54:12 -07:00
Nadia Barbosa
00f5a79eaa Second round of feedback edits from @colleenmcginnis 2018-04-12 14:54:12 -07:00
Nadia Barbosa
d358e16a86 First round of feedback incorporation
Including feedback edits as suggested by @friedbunny
2018-04-12 14:54:12 -07:00
Nadia Barbosa
ca6e03111a [ios, docs] [ios, docs] Rewrite "Adding points to a map" guide 2018-04-12 14:54:12 -07:00
Jason Wray
ad803d77cb [darwin, docs] Further compress images in docs 2018-04-11 18:49:15 -04:00
Anand Thakker
f0f67b4788 Add abs, round, floor, ceil operators (#11653)
* Add abs, round, floor, ceil operators

Port of https://github.com/mapbox/mapbox-gl-js/pull/6496

* [ios, macos] Simplified abs, ceiling, floor expressions

* [ios, macos] Added rounding expression function

* [android] - binding integration for round, ceil, floor and abs expressions

* Update mapbox-gl-js to include non-integer rounding test

* Drop extra braces

* mapbox-gl-js -> master

* Update style-spec docs -> PropertyFactory.java
2018-04-11 12:03:56 -04:00
Minh Nguyễn
a877b6dbe8 [ios, macos] Renamed MGLVectorSource to MGLVectorTileSource 2018-04-02 10:42:54 -07:00
Minh Nguyễn
29a8efab26 [ios, macos] Renamed MGLRasterSource to MGLRasterTileSource
Also updated various source class listings to reflect the addition of image and raster DEM sources.
2018-04-02 10:42:54 -07:00
Minh Nguyễn
8c5eb6ca9c Install aftermarket expression functions (#11472)
* [ios, macos] Introduced more ergonomic expression concatenation syntax

* [ios, macos] Fixed mgl_join:

* [ios, macos] Simplified expression document headings

* [ios, macos] Documented mgl_join:

* [ios, macos] Convert length operator to length: for strings

Only works for literal strings.

* [ios, macos] Implemented type conversion using CAST()

* [ios, macos] Aftermarket let expressions

* [ios, macos] Refactored aftermarket expression functions

Refactored the installation of aftermarket expression functions to use macros. It is no longer necessary to handwrite the type encoding of a function. Also added aftermarket functions for interpolating and stepping.

* [ios, macos] Updated documentation, tests, demo apps

* [ios, macos] Added generic expression function

* [ios, macos] Add MGL_MATCH function placeholder.

* [ios, macos] Add MGL_SWITCH expression operator.

* [ios, macos] Add mgl_coalesce: as expression function.

* [ios, macos] Update style documentation.

* [ios, macos] Add conventional custom function support.

* [ios, macos] Updated example code

* [ios, macos] Add mgl_coalesce conventional custom function support.

* [ios, macos] Add aftermarket function to 'has' operator.

* [ios, macos] Add documentation for lookup and feature operators.

* [ios, macos] Documented simple lookup

* [ios, macos] Renamed, reversed has expression

Renamed mgl_hasProperty:properties: to mgl_does:have: for better readability and consistency with the conventional mgl_has: function. Documented both forms of mgl_has:.

* [ios, macos] Restored OEM conditionals where available

This is the preferred syntax for simple conditionals on iOS 9 and above, because you can inline the predicate instead of wrapping it in a constant value expression, which means you can write a conditional in a single format string.

* [ios, macos] Update style docs.

Co-authored-by: Fabian Guerra <fabian.guerra@mapbox.com>
2018-03-29 10:25:05 -07:00
Molly Lloyd
2dddcba3fc [ios, macos] cherry-pick darwin changes to tileset encoding param onto boba (#11324)
* [ios, macos] add tileset encoding option to darwin sources (#11274)

* add tileset encoding option to darwin sources

* correct style guide

* link out to dem encoding docs

* markdownify comments

* correct changelog
2018-02-27 15:12:25 -08:00
Fabian Guerra
903e7989ec Merge branch 'master' into release-boba
# Conflicts:
#	platform/android/CHANGELOG.md
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java
#	platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/widgets/CompassView.java
#	platform/android/scripts/exclude-activity-gen.json
#	platform/ios/CHANGELOG.md
#	platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec
#	platform/ios/Mapbox-iOS-SDK-symbols.podspec
#	platform/ios/Mapbox-iOS-SDK.podspec
#	platform/macos/CHANGELOG.md
2018-02-15 11:54:51 -05:00
Vladimir Agafonkin
82de856c94 [core, ios, macos, android, node] Heatmap layer (#11046)
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>
2018-02-15 17:38:23 +02:00
Minh Nguyễn
c3bf7c55a1 [ios, macos] Added option to restrict tile source to bounds 2018-02-08 12:03:27 -08:00
Minh Nguyễn
045392938b [ios] Fixed syntax error in style author guide 2018-01-26 10:42:23 -08:00
Minh Nguyễn
fb5b8d34f2 Reimplement style values atop NSExpression (#10726)
* [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
2018-01-24 00:04:02 -08:00
Molly Lloyd
f3294200c6 [core] add raster-dem source type and hillshade layer type (#10642) 2018-01-23 10:49:23 -08:00
Andrew Kitchen
54c4b83312 [ios, macos] Updates documentation with default CJK font recommendations
Also updates the font to use for rendering CJK ideographs in our sample
apps to `PingFang TC`, as simply specifying `PingFang` was always
triggering iOS's font fallback behavior.

[Fixes #10675]
2018-01-02 18:46:40 -05:00
Chris Loer
4fcf1853b0 [ios,macos] Revert ideographic->ideograph name change.
Original GL JS name was meant to represent "font family to use for locally generating ideographs", but "ideographic font family" communicates a similar intent more concisely.
2017-12-11 10:43:00 -08:00
Chris Loer
6dbb9eb22a [ios,macos] Update docs to use Apple-friendly "PingFang" font example. 2017-12-11 10:43:00 -08:00