Start a new topic

ImageResource problem with loading remote images from http

ImageResource problem with loading remote images from http


We're having an issue regarding the loading of remote images with ImageResource. The documentation states that this should be possible, as the example in the documentation itself says

var imageres = new AR.ImageResource("");


We use a similar code, but since we could not get it to work, we replaced it with dummy code to test for errors:

var posTypeImage = new AR.ImageResource("",
    onLoaded: function(width, height)
      alert('Resource loaded!');
    onError: function()
      alert('An error occurred loading the resource!');


However, this code never calls either onLoaded or onError. If I replace the URL with a URL to a local file in the bundle, it works flawlessly.


Do you have any insights why this might not work?

To give a bit of background here:

We actually used HtmlDrawables for displaying some remote images on top of our marker. However the problem is that the HtmlDrawables hover on top of all other elements (including the Poi Radar), which makes it impossible to use for us.

Because of that we tried to switch to loading these images with ImageResources, which lead us to the error stated above.


I checked your image and it is a .gif, which is currently not supported. We suggest using .png instead. However we will have a look at why the error trigger isn't called.

Let me know if you have any other problem after using a different image format (e.g. png).

Thanks for clarification!

Maybe a hint in the docs would be nice that gifs are not supported.

Sadly switching to png is not an option for us, since the production code retrieves the images from a database with millions of gifs in it. But thanks anyways for your quick reply!

Good news: we have just added GIF support for our comming bugfix update, scheduled to be released in the next 2 weeks. Please stay tuned for it and test again once it is available.

Thanks for your understanding.
Login or Signup to post a comment