map.loadImage('./img/car24.png', (error, image) => {
if (error) {
console.log("Car24 image not loaded");
throw error;
}
map.addImage('car24', image);
});
cordova-plugin-wkwebview-engine 1.1.3 "Cordova WKWebView Engine"
- (WKWebViewConfiguration*) createConfigurationFromSettings:(NSDictionary*)settings
{
WKWebViewConfiguration* configuration = [[WKWebViewConfiguration alloc] init];
......
@try {
[configuration.preferences setValue:@TRUE forKey:@"allowFileAccessFromFileURLs"];
}
@catch (NSException *exception) {}
@try {
[configuration setValue:@TRUE forKey:@"allowUniversalAccessFromFileURLs"];
}
@catch (NSException *exception) {}
return configuration;
}
but still, using the file://-Urls resolves in file://img/car24.png not found
I was told that I should try using the FULL-File-URL using the cordova-plugin-filesystem Plugin. But I don't know what "Path" to use ..
I tried
var cpath = cordova.file.documentsDirectory+'img/img24.png';
map.loadImage(cpath, (error, image) => {
....
});
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-statusbar 2.2.3 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"
cordova-plugin-wkwebview-engine 1.1.3 "Cordova WKWebView Engine"
Cordova Version 7.0.1