I'm using LeafletJS map. I need to use an image overlay. I have done it like so:

onMapReady(event: any) {
   this.layers.push(imageOverlay(this.imgSrc + "map.png", [[35.334847, 25.328072], [35.337847, 25.339072]])); // This is the overlay

I can see the small image overlay as below. But how can I show it the whole screen? I think the problem here is set bounds. But how can I set it? I have center "lat": "35.335847", "lon": "25.338072", If this is the center (i.e. with arrow) then how can I show the image entire page? Any clue about how to set the bounds and find out those lat and lon for that?


  • Am I correctly understand that your marker is the centre with the following coordinates "lat": "35.335847", "lon": "25.338072"? – Taras May 13 '19 at 6:24
  • 1
    Cross-posted from stackoverflow.com/questions/56103561/… – IvanSanchez May 13 '19 at 7:16
  • @Taras Yes, you're right. Then how can I set the bounds? I need to show that image entire page. – Sampath May 13 '19 at 10:25

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.