Leaflet no tile (Angular)

Issue

I try to use leaflet with non-geographical image. When I follow the documentation I don’t get the same result (https://leafletjs.com/examples/crs-simple/crs-simple.html). I expect my output to be like below, but it’s like the other picture

i expect it to be

My output

Are there any configuration for CRS ? or TileLayer?

Note: My source code is same as in official document(https://leafletjs.com/examples/crs-simple/crs-simple.html)

Solution

In the tutorial, the single image is added with a Leaflet ImageOverlay.

In your picture, the image is repeated infinitely, which is probably because it has been added as a Tile Layer instead.

If you really need a Tile Layer, you can use its bounds option to prevent loading extra tiles.

Answered By – ghybs

Answer Checked By – Senaida (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.