A
A
alru2018-04-03 15:12:45
Django
alru, 2018-04-03 15:12:45

Django Lealfet how to add draw toolbar buttons to map?

Hello, dear forum users.
I ran into this problem: I want to implement my own administrative panel (you can say in the frontend), where the user will be able to add objects to the map on their own.
Created a form, added it to the page. The form and fields are displayed, but there is no draw-toolbar in the "Map" field, which allows you to set a marker and draw borders on the map.
The map settings are specified in the settings.py file under the LEAFLET_CONFIG section.
In models.py I connect:
from leaflet.forms.widgets import LeafletWidget
from leaflet.forms.fields import PointField
Both of them display the map, but there is no way to set a marker and draw borders on the map.
I think that draw-toolbar needs to be connected from there, but I don't know the code. Who knows, tell me please. Thanks a lot!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question