Start a new topic

how to load photo in a marker drawable?

how to load photo in a marker drawable?


i have encapsulated a base64 image for each marker in my json, but i am not able to show it on the marker how can i achieve that?

my json base64 transfering image is ok, i can show the photo in the index.htm of my ARchitectWorld if i make a sample test like
$("#test").html("<img src='data:image/jpg;base64,"+poiData.vignette+"'>");

but how to send this image ressource to a AR.ImageResource or an AR.imageDrawable?

I have try to add a AR.HtmlDrawable to my GeoObject, like this
 this.myDrawable = new AR.HtmlDrawable({html:"<img src='data:image/jpg;base64,"+poiData.vignette+"'>"}, 1.0);

with no succes, crash???

anyone have an idea, thank you by advance

ok it works, i have found the problem, it's simply that i have not defined the size of the viewport and the ratio of my htmlDrawable.

the photo was rendering but not visible due to the incorect sze.

maybe help someone.



Hi Jean,
Sorry for my late response and THX for sharing your findings with the community.

Best regards

Login or Signup to post a comment