I'm playing with django-leaflet and django-geojson.
The map is working great on the public website (https://nacros.eu.pythonanywhere.com/map), I'm trying to make it works in the admin.
In the admin, the map show for a PointField but it's a normal map without draw tools.
django-leaflet==0.27.1
python==3.7
django==3.1.7
Models :
class POI(models.Model):
name = models.CharField(max_length=64)
geom = PointField()
leaflet.extras.js:186 Uncaught TypeError: L.Control.MiniMap is not a constructor
at i.<anonymous> (leaflet.extras.js:186)
at i.whenReady (leaflet.js:5)
at i._djSetupControls (leaflet.extras.js:185)
at initialize (leaflet.extras.js:68)
at new i (leaflet.js:5)
at Function.L.Map.djangoMap (leaflet.extras.js:211)
at loadmap ((index):500)
If I turn off the minimap in settings, draw tools appear. So the problem is the minimap in admin widget.
Hi,
I'm playing with django-leaflet and django-geojson. The map is working great on the public website (https://nacros.eu.pythonanywhere.com/map), I'm trying to make it works in the admin. In the admin, the map show for a PointField but it's a normal map without draw tools.
django-leaflet==0.27.1 python==3.7 django==3.1.7
Models :
Admin :
admin.site.register(POI, LeafletGeoAdmin)
settings :
Admin view :
I have one javascript error that is related :
If I turn off the minimap in settings, draw tools appear. So the problem is the minimap in admin widget.
Thx for your help.