summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-01-07 15:54:08 -0800
committerMinh Nguyễn <mxn@1ec5.org>2017-01-07 15:54:08 -0800
commitd3a2ffe747550216b19d678c40980231baeeef11 (patch)
treec615731800743f5278cae4059afd69b1d973da16
parentbf8d037fca3a5e76818f2cd546e783814f046019 (diff)
downloadqtlocation-mapboxgl-d3a2ffe747550216b19d678c40980231baeeef11.tar.gz
[ios, macos] Fixed links to paint properties in style spec
-rw-r--r--platform/darwin/scripts/generate-style-code.js11
-rw-r--r--platform/darwin/src/MGLCircleStyleLayer.h6
-rw-r--r--platform/darwin/src/MGLFillStyleLayer.h6
-rw-r--r--platform/darwin/src/MGLLineStyleLayer.h6
-rw-r--r--platform/darwin/src/MGLRasterStyleLayer.h6
-rw-r--r--platform/darwin/src/MGLSymbolStyleLayer.h8
6 files changed, 26 insertions, 17 deletions
diff --git a/platform/darwin/scripts/generate-style-code.js b/platform/darwin/scripts/generate-style-code.js
index dfc0d64ec2..a5fff0322d 100644
--- a/platform/darwin/scripts/generate-style-code.js
+++ b/platform/darwin/scripts/generate-style-code.js
@@ -180,7 +180,16 @@ global.propertyDoc = function (propertyName, property, layerType, kind) {
doc += '\n\n' + propertyReqs(property, spec[`${kind}_${layerType}`], layerType);
}
if ('original' in property) {
- doc += `\n\nThis attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-${layerType}-${property.original}"><code>${property.original}</code></a> layout property in the Mapbox Style Specification.`;
+ let anchor;
+ switch (kind) {
+ case 'layout':
+ anchor = `layout-${layerType}-${property.original}`;
+ break;
+ case 'paint':
+ anchor = `paint-${property.original}`;
+ break;
+ }
+ doc += `\n\nThis attribute corresponds to the <a href="https://www.mapbox.com/mapbox-gl-style-spec/#${anchor}"><code>${property.original}</code></a> layout property in the Mapbox Style Specification.`;
}
}
return doc;
diff --git a/platform/darwin/src/MGLCircleStyleLayer.h b/platform/darwin/src/MGLCircleStyleLayer.h
index cdb51f0819..87839467a9 100644
--- a/platform/darwin/src/MGLCircleStyleLayer.h
+++ b/platform/darwin/src/MGLCircleStyleLayer.h
@@ -137,7 +137,7 @@ typedef NS_ENUM(NSUInteger, MGLCircleTranslationAnchor) {
`nil` to reset it to the default value.
This attribute corresponds to the <a
- href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-circle-circle-pitch-scale"><code>circle-pitch-scale</code></a>
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-circle-pitch-scale"><code>circle-pitch-scale</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circleScaleAlignment;
@@ -155,7 +155,7 @@ typedef NS_ENUM(NSUInteger, MGLCircleTranslationAnchor) {
default value.
This attribute corresponds to the <a
- href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-circle-circle-translate"><code>circle-translate</code></a>
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-circle-translate"><code>circle-translate</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circleTranslation;
@@ -173,7 +173,7 @@ typedef NS_ENUM(NSUInteger, MGLCircleTranslationAnchor) {
Otherwise, it is ignored.
This attribute corresponds to the <a
- href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-circle-circle-translate-anchor"><code>circle-translate-anchor</code></a>
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-circle-translate-anchor"><code>circle-translate-anchor</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *circleTranslationAnchor;
diff --git a/platform/darwin/src/MGLFillStyleLayer.h b/platform/darwin/src/MGLFillStyleLayer.h
index f46998be5b..8bdf177a30 100644
--- a/platform/darwin/src/MGLFillStyleLayer.h
+++ b/platform/darwin/src/MGLFillStyleLayer.h
@@ -60,7 +60,7 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslationAnchor) {
the default value.
This attribute corresponds to the <a
- href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-fill-fill-antialias"><code>fill-antialias</code></a>
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-antialias"><code>fill-antialias</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable, getter=isFillAntialiased) MGLStyleValue<NSNumber *> *fillAntialiased;
@@ -129,7 +129,7 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslationAnchor) {
default value.
This attribute corresponds to the <a
- href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-fill-fill-translate"><code>fill-translate</code></a>
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-translate"><code>fill-translate</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *fillTranslation;
@@ -147,7 +147,7 @@ typedef NS_ENUM(NSUInteger, MGLFillTranslationAnchor) {
Otherwise, it is ignored.
This attribute corresponds to the <a
- href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-fill-fill-translate-anchor"><code>fill-translate-anchor</code></a>
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-fill-translate-anchor"><code>fill-translate-anchor</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *fillTranslationAnchor;
diff --git a/platform/darwin/src/MGLLineStyleLayer.h b/platform/darwin/src/MGLLineStyleLayer.h
index 75a71a3923..f25acecf97 100644
--- a/platform/darwin/src/MGLLineStyleLayer.h
+++ b/platform/darwin/src/MGLLineStyleLayer.h
@@ -201,7 +201,7 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslationAnchor) {
Otherwise, it is ignored.
This attribute corresponds to the <a
- href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-line-line-dasharray"><code>line-dasharray</code></a>
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-line-dasharray"><code>line-dasharray</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSArray<NSNumber *> *> *lineDashPattern;
@@ -260,7 +260,7 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslationAnchor) {
default value.
This attribute corresponds to the <a
- href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-line-line-translate"><code>line-translate</code></a>
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-line-translate"><code>line-translate</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *lineTranslation;
@@ -278,7 +278,7 @@ typedef NS_ENUM(NSUInteger, MGLLineTranslationAnchor) {
Otherwise, it is ignored.
This attribute corresponds to the <a
- href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-line-line-translate-anchor"><code>line-translate-anchor</code></a>
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-line-translate-anchor"><code>line-translate-anchor</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *lineTranslationAnchor;
diff --git a/platform/darwin/src/MGLRasterStyleLayer.h b/platform/darwin/src/MGLRasterStyleLayer.h
index 45ab25a8f1..54a3149e8c 100644
--- a/platform/darwin/src/MGLRasterStyleLayer.h
+++ b/platform/darwin/src/MGLRasterStyleLayer.h
@@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
it to the default value.
This attribute corresponds to the <a
- href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-raster-raster-brightness-max"><code>raster-brightness-max</code></a>
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-raster-brightness-max"><code>raster-brightness-max</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *maximumRasterBrightness;
@@ -61,7 +61,7 @@ NS_ASSUME_NONNULL_BEGIN
it to the default value.
This attribute corresponds to the <a
- href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-raster-raster-brightness-min"><code>raster-brightness-min</code></a>
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-raster-brightness-min"><code>raster-brightness-min</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *minimumRasterBrightness;
@@ -98,7 +98,7 @@ NS_ASSUME_NONNULL_BEGIN
it to the default value.
This attribute corresponds to the <a
- href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-raster-raster-hue-rotate"><code>raster-hue-rotate</code></a>
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-raster-hue-rotate"><code>raster-hue-rotate</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSNumber *> *rasterHueRotation;
diff --git a/platform/darwin/src/MGLSymbolStyleLayer.h b/platform/darwin/src/MGLSymbolStyleLayer.h
index 264d3adb0f..278c582c93 100644
--- a/platform/darwin/src/MGLSymbolStyleLayer.h
+++ b/platform/darwin/src/MGLSymbolStyleLayer.h
@@ -960,7 +960,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslationAnchor) {
Otherwise, it is ignored.
This attribute corresponds to the <a
- href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-translate"><code>icon-translate</code></a>
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-icon-translate"><code>icon-translate</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTranslation;
@@ -978,7 +978,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslationAnchor) {
`iconTranslation` is non-`nil`. Otherwise, it is ignored.
This attribute corresponds to the <a
- href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-translate-anchor"><code>icon-translate-anchor</code></a>
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-icon-translate-anchor"><code>icon-translate-anchor</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *iconTranslationAnchor;
@@ -1092,7 +1092,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslationAnchor) {
it is ignored.
This attribute corresponds to the <a
- href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-translate"><code>text-translate</code></a>
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-text-translate"><code>text-translate</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textTranslation;
@@ -1110,7 +1110,7 @@ typedef NS_ENUM(NSUInteger, MGLTextTranslationAnchor) {
`textTranslation` is non-`nil`. Otherwise, it is ignored.
This attribute corresponds to the <a
- href="https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-text-translate-anchor"><code>text-translate-anchor</code></a>
+ href="https://www.mapbox.com/mapbox-gl-style-spec/#paint-text-translate-anchor"><code>text-translate-anchor</code></a>
layout property in the Mapbox Style Specification.
*/
@property (nonatomic, null_resettable) MGLStyleValue<NSValue *> *textTranslationAnchor;