javascript - How to add a non-referenced image as overlay in leaflet -
i have leaflet map, tilelayer , markers. add image overlay add effects , styling tiles.
l.imageoverlay nice, requires bounds, whereas anchor image absolute pixels of rendered map. example have effect continuous towards zoom levels.
it should possible getting extent , redefining bounds of layer each time, ridiculous, these need converted absolute values internally. nevertheless, couldn't find way of doing reading api.
you can image things frame, fading, etc... on top of map.
you use control , div manipulate image. not sure if helps.
var legend2 = l.control({position: 'topleft'}); legend2.onadd = function (map) { var div = l.domutil.create('div', 'info legend2'); div.innerhtml = '<img src="https://upload.wikimedia.org/wikipedia/commons/4/47/png_transparency_demonstration_1.png" style="transform: matrix3d(-0.509677, 0.655299, 0, -0.000417152, 0.597349, 0.564009, 0, 0.000111701, 0, 0, 1, 0, 0, 0, 0, 1); ">'; return div; }; legend2.addto(map);
Comments
Post a Comment