I'm trying to stitch the picture taken from my drone onto the map, and I'm using Django 1.11.14 and latest version leaflet 1.3.4. I tried to use ImageOverlay, there is no error but the image does not appear on my map

var imageUrl = "/media/photos/2018/10/18/DJI_0001_2.JPG";
var imageBounds = [[101.6999678,2.9244267], [101.611, 2.983226]];
L.imageOverlay(imageUrl, imageBounds).addTo(map);
  • Not so experienced with js, but the example you link to uses the syntax: var imageUrl = "/media/photos/2018/10/18/DJI_0001_2.JPG", imageBounds = [[101.6999678,2.9244267], [101.611, 2.983226]];. I.e. replace ; with ' after '...2.JPG"' and loose the second var. I doubt this is the only issue though. – RoperMaps Oct 31 '18 at 9:20
  • 1
    @RoperMaps Both approaches are completely valid. – Stefan Oct 31 '18 at 9:38
  • @OP The console is completely empty? You could bind a listener to the imageOverlay: on('error', function (e) { console.log(e) }) – Stefan Oct 31 '18 at 9:43
  • @Stefan_Fairphone thank you Stefan for the respond, apparently I mismatched the latlong. It works well now, however the image is not properly stitch as it appear bigger than it supposed to be. my appologies I'm really new to this – Mutant Neko Nov 8 '18 at 4:05
  • Please update your question accordingly or answer this one and create a new question. – Stefan Nov 8 '18 at 7:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.