diff --git a/docs/UserLocation.md b/docs/UserLocation.md index 42fb0b00a..26bcbcec8 100644 --- a/docs/UserLocation.md +++ b/docs/UserLocation.md @@ -9,8 +9,29 @@ | visible | `bool` | `true` | `false` | FIX ME NO DESCRIPTION | | onPress | `func` | `none` | `false` | FIX ME NO DESCRIPTION | | onUpdate | `func` | `none` | `false` | FIX ME NO DESCRIPTION | +| children | `any` | `none` | `false` | FIX ME NO DESCRIPTION | ### methods +#### setLocationManager({running}) + + + +##### arguments +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | +| `{running}` | `n/a` | `Yes` | undefined | + + +#### needsLocationManagerRunning() + + + +##### arguments +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | + + + #### userIconLayers() diff --git a/docs/docs.json b/docs/docs.json index 909842fc4..9b9f445df 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -4107,6 +4107,25 @@ "UserLocation": { "description": "", "methods": [ + { + "name": "setLocationManager", + "docblock": null, + "modifiers": [], + "params": [ + { + "name": "{running}", + "type": null + } + ], + "returns": null + }, + { + "name": "needsLocationManagerRunning", + "docblock": null, + "modifiers": [], + "params": [], + "returns": null + }, { "name": "userIconLayers", "docblock": null, @@ -4150,6 +4169,13 @@ "type": "func", "default": "none", "description": "FIX ME NO DESCRIPTION" + }, + { + "name": "children", + "required": false, + "type": "any", + "default": "none", + "description": "FIX ME NO DESCRIPTION" } ], "name": "UserLocation" diff --git a/ios/RCTMGL/RCTMGLStyle.m b/ios/RCTMGL/RCTMGLStyle.m index 5f8cc01ba..c70984844 100644 --- a/ios/RCTMGL/RCTMGLStyle.m +++ b/ios/RCTMGL/RCTMGLStyle.m @@ -58,7 +58,7 @@ - (void)fillLayer:(MGLFillStyleLayer *)layer withReactStyle:(NSDictionary *)reac } else { NSString *imageURI = [styleValue getImageURI]; - [RCTMGLUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { + [RCTMGLUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { if (image != nil) { dispatch_async(dispatch_get_main_queue(), ^{ [_style setImage:image forName:imageURI]; @@ -140,7 +140,7 @@ - (void)lineLayer:(MGLLineStyleLayer *)layer withReactStyle:(NSDictionary *)reac } else { NSString *imageURI = [styleValue getImageURI]; - [RCTMGLUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { + [RCTMGLUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { if (image != nil) { dispatch_async(dispatch_get_main_queue(), ^{ [_style setImage:image forName:imageURI]; @@ -458,7 +458,7 @@ - (void)fillExtrusionLayer:(MGLFillExtrusionStyleLayer *)layer withReactStyle:(N } else { NSString *imageURI = [styleValue getImageURI]; - [RCTMGLUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { + [RCTMGLUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { if (image != nil) { dispatch_async(dispatch_get_main_queue(), ^{ [_style setImage:image forName:imageURI]; @@ -604,7 +604,7 @@ - (void)backgroundLayer:(MGLBackgroundStyleLayer *)layer withReactStyle:(NSDicti } else { NSString *imageURI = [styleValue getImageURI]; - [RCTMGLUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { + [RCTMGLUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { if (image != nil) { dispatch_async(dispatch_get_main_queue(), ^{ [_style setImage:image forName:imageURI]; diff --git a/scripts/autogenHelpers/globals.js b/scripts/autogenHelpers/globals.js index 6dbe52783..bfa6e5f4f 100644 --- a/scripts/autogenHelpers/globals.js +++ b/scripts/autogenHelpers/globals.js @@ -37,6 +37,7 @@ const iosSpecOverrides = { 'icon-translate-anchor': 'icon-translation-anchor', 'text-translate': 'text-translation', 'text-translate-anchor': 'text-translation-anchor', + 'raster-resampling': 'raster-resampling-mode', }; global.getValue = function(value, defaultValue) { @@ -171,7 +172,7 @@ global.androidOutputType = function(type, value) { } }; -global.androidGetConfigType = function(androidType) { +global.androidGetConfigType = function(androidType, name) { switch (androidType) { case 'Integer': return 'styleValue.getInt(VALUE_KEY)'; @@ -184,7 +185,11 @@ global.androidGetConfigType = function(androidType) { case 'String[]': return 'styleValue.getStringArray(VALUE_KEY)'; default: - return 'styleValue.getString(VALUE_KEY)'; + if (name === 'iconImage') { + return 'styleValue.getImageURI()'; + } else { + return 'styleValue.getString(VALUE_KEY)'; + } } }; diff --git a/scripts/templates/RCTMGLStyle.m.ejs b/scripts/templates/RCTMGLStyle.m.ejs index 2e8fe4a51..3104832f9 100644 --- a/scripts/templates/RCTMGLStyle.m.ejs +++ b/scripts/templates/RCTMGLStyle.m.ejs @@ -41,7 +41,7 @@ } else { NSString *imageURI = [styleValue getImageURI]; - [RCTMGLUtils fetchImage:_bridge url:imageURI callback:^(NSError *error, UIImage *image) { + [RCTMGLUtils fetchImage:_bridge url:imageURI scale:[styleValue getImageScale] callback:^(NSError *error, UIImage *image) { if (image != nil) { dispatch_async(dispatch_get_main_queue(), ^{ [_style setImage:image forName:imageURI]; diff --git a/scripts/templates/RCTMGLStyleFactory.java.ejs b/scripts/templates/RCTMGLStyleFactory.java.ejs index 2592c6817..266954f59 100644 --- a/scripts/templates/RCTMGLStyleFactory.java.ejs +++ b/scripts/templates/RCTMGLStyleFactory.java.ejs @@ -78,7 +78,7 @@ public class RCTMGLStyleFactory { if (styleValue.isExpression()) { layer.setProperties(PropertyFactory.<%= prop.name %>(styleValue.getExpression())); } else { - layer.setProperties(PropertyFactory.<%= prop.name %>(<%- androidGetConfigType(androidInputType(prop.type, prop.value)) -%>)); + layer.setProperties(PropertyFactory.<%= prop.name %>(<%- androidGetConfigType(androidInputType(prop.type, prop.value), prop.name) -%>)); } <%_ } _%> }