I uploaded the Selecting POIs Example to my webspace without any modifications. When using the Wikitude World Browser on Android to launch the example app via URL, it worked but never loaded any image resources.
The randomly generated POIs are shown as labels, but the backround PNG images are never loaded. I also tried to use a full http path instead of the "assets/marker_idle.png" but it didn't work either. The image is definitely available online, as it is loaded without any issues by my normal browser.
Please let me know your findings so we can check internally.
Best regards, Andreas
C
Colin Weitmann
said
about 8 years ago
I'm sorry, but I don't quite get what you mean. We tried the normal relative path (as it is used as a default in the example) as well as an HTTP-URL to the image files.
The location is not the problem, as we can see the POIs, only the background image isn't shown because it's not loaded correctly.
Regards,
Colin
A
Andreas Fötschl
said
about 8 years ago
Hi again!
Sorry, I just listed all possible issues. In case the idle images are not shown please ensure image protocol is same as the one used in index.html (especially in case you access it via https). Also check size and type of the idle image and try the original file. Implement the onError callback of AR.ImageResource and log its first parameter to hopefully find out more about the root cause.
Best regards
C
Colin Weitmann
said
about 8 years ago
Hi,
i tried around a bit more with the ImageResources. I've found out that there aren't any errors when debugging in Firefox on my desktop. The onError function is never called in that case.
However, when I execute it in the Wikitude World Browser App, the alert says "The requested URL returned error: 403 Forbidden". I don't understand what's the difference. I try to access the same resource from both, desktop and phone. The launch URL is http://culer.lima-city.de/modules/campus, and as you can see, the ImageResources are also accessed via http. Maybe you can find out more about this, I've no idea what else I could try.
Thanks and kind regards,
Colin
loadPoisFromJsonData: function loadPoisFromJsonDataFn(poiData) { // empty list of visible markers World.markerList = ;
// Start loading marker assets: // Create an AR.ImageResource for the marker idle-image World.markerDrawable_idle = new AR.ImageResource("http:x2F\x2Fculer.lima-city.de\x2Fmodules\x2Fcampus\x2Fassets\x2Fmarker_idle.png",{onError: errorLoadingImage}); AR.i.imageResourceInterface.startLoading({objectId : '1'});
// Called if loading of the image fails function errorLoadingImage(param1) { alert(param1 + param1.class);
}
// Create an AR.ImageResource for the marker selected-image World.markerDrawable_selected = new AR.ImageResource("http:\x2F\x2Fculer.lima-city.de\x2Fmodules\x2Fcampus\x2Fassets\x2Fmarker_selected.png"); // Create an AR.ImageResource referencing the image that should be displayed for a direction indicator. World.markerDrawable_directionIndicator = new AR.ImageResource("http:\x2F\x2Fculer.lima-city.de\x2Fmodules\x2Fcampus\x2Fassets\x2Findi.png");
A
Andreas Fötschl
said
about 8 years ago
Please use plain url as ImageResource arguments, e.g.
I've done that before. I just put it back to that type of URL right now (it's on the server). It doesn't make a difference, the described behavior is the same.
Regards,
Colin
A
Andreas Fötschl
said
about 8 years ago
Please try directly using an Android or iOS test-device to see wether the ImageDrawable is displayed but also check if using e.g. a dropbox link causes same issue. Also check if you're using latest SDK and ade.js file and ensure to check "auto load assets on startup" in the ade mask.
Colin Weitmann