makinacorpus / django-leaflet

Use Leaflet in your Django projects
GNU Lesser General Public License v3.0
710 stars 281 forks source link

use custom tile map in admin site #359

Closed eowusu14 closed 1 year ago

eowusu14 commented 1 year ago

I added a .png map with size 13519 x 7318 as a tile but it is improperly displayed. The single image is grid into 3

admin interface

Here is the code I used to add the tile

tile

How best can I add a custom .png map as a base map without it being grided? I'm using django 3.2 Thank you

Gagaro commented 1 year ago

You should set nowrap to true: https://leafletjs.com/reference.html#gridlayer-nowrap

eowusu14 commented 1 year ago

Thank you, it is fixed. I converted the png file to tiles and I'm able to zoom in and out