You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Thx for your help.
The text was updated successfully, but these errors were encountered:
cantin-f
changed the title
Admin Widget don't show draw tools
Admin Widget don't show draw tools when minimap is active
Feb 20, 2021
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.
The text was updated successfully, but these errors were encountered: