We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c408333 commit c35f0feCopy full SHA for c35f0fe
ios/AirGoogleMaps/AIRGoogleMapMarker.m
@@ -182,6 +182,18 @@ - (void)setImageSrc:(NSString *)imageSrc
182
_reloadImageCancellationBlock = nil;
183
}
184
185
+ if (!_imageSrc) {
186
+ if (_iconImageView) [_iconImageView removeFromSuperview];
187
+ return;
188
+ }
189
+
190
+ if (!_iconImageView) {
191
+ // prevent glitch with marker (cf. https://github.com/airbnb/react-native-maps/issues/738)
192
+ UIImageView *empyImageView = [[UIImageView alloc] init];
193
+ _iconImageView = empyImageView;
194
+ [self iconViewInsertSubview:_iconImageView atIndex:0];
195
196
197
_reloadImageCancellationBlock = [_bridge.imageLoader loadImageWithURLRequest:[RCTConvert NSURLRequest:_imageSrc]
198
size:self.bounds.size
199
scale:RCTScreenScale()
0 commit comments