how to How to use base64 string instead of URL in Leaflet ImageLayer
I am using ImegeLayer to print an overlay image over a map using Leaflet. If I use an image that is accessible online, i.e. using Leaflet example:
var imageUrl = 'http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg', imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]]; L.imageOverlay(imageUrl, imageBounds).addTo(map);
everything works fine. I would however like to use an base64 encoded string as the image. This string is precomputed somewhere else in my script.
How should I insert such string in instead of an URL path?
PS: I am using angularjs.