(iOS) Bug fix: can not load images if the app uses WKWebview, the code specifies relative path, and the app page is run on top path (http://localhost:8080/index.html)
MODIFY
src/ios/GoogleMaps/PluginGroundOverlay.m
src/ios/GoogleMaps/PluginGroundOverlay.m
dispatch_sync(dispatch_get_main_queue(), ^{
NSURL *url = [webview URL];
NSString *currentURL = url.absoluteString;
+ if (![[url lastPathComponent] isEqualToString:@"/"]) {
currentURL = [currentURL stringByDeletingLastPathComponent];
+ }
url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", currentURL, urlStr]];
[self downloadImageWithURL:url completionBlock:^(BOOL succeeded, UIImage *image) {

MODIFY
src/ios/GoogleMaps/PluginMarker.m
src/ios/GoogleMaps/PluginMarker.m
// WKWebView URL is use http:// always
//------------------------------------------
- dispatch_sync(dispatch_get_main_queue(), ^{
+ [[NSOperationQueue mainQueue] addOperationWithBlock:^{
NSURL *url = [webview URL];
NSString *currentURL = url.absoluteString;
+ if (![[url lastPathComponent] isEqualToString:@"/"]) {
currentURL = [currentURL stringByDeletingLastPathComponent];
+ }
//url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", currentURL, iconPath]];
//
// Load the icon from over the internet
//
-
- dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul);
- dispatch_async(queue, ^{
+ [self.mapCtrl.executeQueue addOperationWithBlock:^{
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@", currentURL, iconPath]];
}];
- });
+ }];
- });
+ }];
return;
}

(iOS) Bug fix: can not load images if the app uses WKWebview, the code specifies relative path, and the app page is run on top path (http://localhost:8080/index.html)