Skip to content
Draft
Show file tree
Hide file tree
Changes from 184 commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
e8a9059
update style
kayarhabby Apr 30, 2025
74fbd23
ajout des commentaires et réorganisation settings
kayarhabby May 4, 2025
b4b5230
mise en place d'un groupedLayerControl custom
kayarhabby May 5, 2025
bc50aca
mise en place d'une classe de base permettant l'initialisation de la …
kayarhabby May 5, 2025
12c1986
ajout de la carte maplibre de base dans base
kayarhabby May 5, 2025
357ec88
mise en place de Reset control, elle n'a pas encore été ajouté dans l…
kayarhabby May 5, 2025
72f64af
update stylec
kayarhabby May 5, 2025
9baa1a5
add style-maplibre.css
kayarhabby May 6, 2025
f4a6e35
gestion du problème groupe controller switch et ajout du controller r…
kayarhabby May 6, 2025
aad91f8
update base
kayarhabby May 6, 2025
6334029
add MeasureMaplibreControl
kayarhabby May 6, 2025
36909e5
mise en place du controller de mesure
kayarhabby May 6, 2025
42282af
ajout de commentaire
kayarhabby May 7, 2025
92ea031
update (ajout de bounds et ResetMaplibreViewControl)
kayarhabby May 7, 2025
2df50cb
update
kayarhabby May 7, 2025
f2d982e
ajout de nouveau script js
kayarhabby May 7, 2025
8f29e0b
modifications des noms de fichiers de scripts maplibre
kayarhabby May 9, 2025
a70ab9a
update
kayarhabby May 9, 2025
5393c46
les modifications entreprit au niveau de maplibreObjectsLayer on sévè…
kayarhabby May 9, 2025
3f1ddbb
Update
kayarhabby May 9, 2025
e4b3b29
amélioration globale de la classe, ne gère plus que l'initialisation …
kayarhabby May 9, 2025
157831a
modification du nom du fichier et au vu des changements dans Maplibre…
kayarhabby May 9, 2025
a617b7c
modification du nom du fichier
kayarhabby May 9, 2025
6754df6
reste à gerer la surbrillance, l'affichage des labels et certainement…
kayarhabby May 9, 2025
b7820cf
modification du nom de fichier
kayarhabby May 9, 2025
5888f83
mise en commentaire de certains blocs de code
kayarhabby May 12, 2025
cd2cf16
ajout de nouveau fichier
kayarhabby May 12, 2025
3dc5859
mise à jour du fichier, prise en compte du controller de fichier
kayarhabby May 12, 2025
1e99be1
mise en place de MaplibreFileLayerControl, permet entre autre d'affic…
kayarhabby May 12, 2025
e25b0b1
mise en place de MaplibreFileLoader, permet entre autre d'afficher de…
kayarhabby May 12, 2025
d9f0c70
ajout de l'attribut container, reference de mapContainer
kayarhabby May 12, 2025
21e4855
update
kayarhabby May 12, 2025
69fff9c
ajout de commentaire
kayarhabby May 12, 2025
4d5434a
fix : bug sur le dessin géré, le nouveau fond d'écran est ajouté just…
kayarhabby May 13, 2025
db5fe8f
fix bug highlight
kayarhabby May 13, 2025
07a4cf3
modification de l'initialisation de MaplibreObjectsLayer et MaplibreL…
kayarhabby May 14, 2025
c98363e
suppression d'une instance de MaplibreObjectsLayer dans MaplibreMap
kayarhabby May 14, 2025
c128329
update
kayarhabby May 14, 2025
4fc2700
gestion du problème MaplibreLayerControl qui n'affichait pas les couc…
kayarhabby May 14, 2025
728a26d
mise en commentaire de l'ajout du css du popup
kayarhabby May 14, 2025
89ba793
suppression de pointToLayer et onEachFeature
kayarhabby May 14, 2025
c361d73
modification de la méthode calculateBounds et mise en place des événe…
kayarhabby May 14, 2025
5ebfb3d
ajout de console log pour le problème onMouseMove et affichage unique…
kayarhabby May 14, 2025
52e707d
ajout css label et bouton measure
kayarhabby May 14, 2025
16896d8
forcer le crooshair sur le curseur en mode dessein
kayarhabby May 14, 2025
4b84df9
update _onMouseMove
kayarhabby May 14, 2025
0cf2e97
fix bug sur la superposition des couches
kayarhabby May 15, 2025
beb7643
utilisation de la syntaxe async/await au niveau de la méthode load
kayarhabby May 15, 2025
917b64a
Mise à jour de helpers et mise en place de MaplibreMapListSync
kayarhabby May 15, 2025
48e1e0f
ajout de MapblibreMapListSync
kayarhabby May 15, 2025
afe47ae
mise en commentaire de showLineLabel
kayarhabby May 15, 2025
9b4e121
ajout de datatables et mapsync
kayarhabby May 15, 2025
f25a924
update : mise en commentaire des méthodes qui ne peuvent être utilisé…
kayarhabby May 15, 2025
2a5c251
update : mise en commentaire de parseColor
kayarhabby May 15, 2025
4aed24b
update de base
kayarhabby May 16, 2025
d2c3b66
update
kayarhabby May 16, 2025
f3f0e54
update : ajout de la reference du controller MaplibreResetViewControl
kayarhabby May 16, 2025
a520505
mise en place de la première ébauche du context
kayarhabby May 16, 2025
2eb9cd0
mise en place de la première ébauche de History
kayarhabby May 16, 2025
c26e550
update : remplacement de self par this car les classes gère bien le c…
kayarhabby May 16, 2025
a18f82f
Update
kayarhabby May 16, 2025
85ee39f
mise en place et test context
kayarhabby May 19, 2025
96fa3a6
modification des boutons base layers en radio buttons
kayarhabby May 19, 2025
931b377
ajout MaplibreMapentityContext.js
kayarhabby May 19, 2025
121253f
update
kayarhabby May 20, 2025
1ac8336
Mise en place de history
kayarhabby May 20, 2025
2a11d7a
ajout de MaplibreMapentityHistory
kayarhabby May 20, 2025
536f65a
update : mise en commentaire du code leaflet et de l'injection de la …
kayarhabby May 20, 2025
a8777e2
update : mise à jour de la carte maplibre et du bounds
kayarhabby May 20, 2025
0ff3a36
update : contient le code backend pour la capture d'écran de la carte
kayarhabby May 20, 2025
eff2dd6
mise en place du rectangle permettant de délimiter la zone de filtrag…
kayarhabby May 21, 2025
6a67ef3
mise à jour des commentaires
kayarhabby May 21, 2025
3f1dc47
gestion du filtre
kayarhabby May 22, 2025
d414047
remise en place de la selection et du fitbounds sur un layer en parti…
kayarhabby May 23, 2025
a6c8a93
update
kayarhabby May 23, 2025
5a23b4d
update
kayarhabby May 26, 2025
7e8d802
update
kayarhabby May 26, 2025
ef1b73a
update : suppression du bounds static déclaré dans mapentity-init-map…
kayarhabby May 26, 2025
8e2e0f8
Correction du bug sur le filtre. Affichage correct du popover et du h…
kayarhabby May 26, 2025
436ca10
correction du bug sur la cohérence entre les objets présents sur la c…
kayarhabby May 27, 2025
fc88817
update : suppression dans overlays des couches filtrées
kayarhabby May 27, 2025
afa925d
update : amélioration de la classe notamment en améliorant la gestion…
kayarhabby May 27, 2025
e2a95a9
update
kayarhabby May 27, 2025
63f7633
mise en place de MaplibreScreenshotControl
kayarhabby May 27, 2025
0c5d401
update
kayarhabby May 27, 2025
aded110
Gestion de settings
kayarhabby May 27, 2025
bbbac15
Intégration réussi des settings dans le code js
kayarhabby May 28, 2025
db8a284
sélection auto de la première couche comme fond de carte par défaut
kayarhabby May 28, 2025
adf752f
Mise en place de la simplification
kayarhabby May 28, 2025
10627be
Mise en place du flow
kayarhabby May 30, 2025
819b348
Mise à jour des fichiers
kayarhabby Jun 2, 2025
a9fc591
suppression de maplibre_map_init
kayarhabby Jun 2, 2025
55bcc21
correction style
kayarhabby Jun 3, 2025
aba4c6f
correction bug fileLoader
kayarhabby Jun 3, 2025
56537ee
filtre corrigé
kayarhabby Jun 3, 2025
7b2f413
custom label
kayarhabby Jun 3, 2025
72c9c73
apport de modification sur context
kayarhabby Jun 3, 2025
3195d9f
update
kayarhabby Jun 4, 2025
85ef35b
update
kayarhabby Jun 4, 2025
4023a8c
correction bug context
kayarhabby Jun 4, 2025
7ec3eae
ajout de la translation
kayarhabby Jun 4, 2025
c91cafa
suppression de la l'outil recherche intégré à Datatable
kayarhabby Jun 4, 2025
ed698df
update
kayarhabby Jun 4, 2025
a4e2078
update
kayarhabby Jun 5, 2025
e267b16
mise en place widgets
kayarhabby Jun 5, 2025
4b8a024
update
kayarhabby Jun 5, 2025
933f98e
Résolution du bug d'affichage de la carte et gestion du rafraichissem…
kayarhabby Jun 6, 2025
bb0c1be
update widgets
kayarhabby Jun 10, 2025
f22c645
mise en place du controller draw sur la carte formulaire
kayarhabby Jun 11, 2025
e627741
ajout des géométries après création dans le champs textarea et ajout…
kayarhabby Jun 12, 2025
773495e
fix bug sur les lignes et polygones, suppression du polygon ou linest…
kayarhabby Jun 12, 2025
ca9a867
snap
kayarhabby Jun 12, 2025
2c4c6da
mise en commentaire du snap, et correction surbrillance pour les lign…
kayarhabby Jun 12, 2025
b64386e
suppression snap
kayarhabby Jun 13, 2025
0298141
correction reset detail
kayarhabby Jun 13, 2025
3d2c7ed
update image MaplibreMeasureControl
kayarhabby Jun 13, 2025
53b1dd9
fix bug dessin polygone et ligne
kayarhabby Jun 13, 2025
f9db32d
update
kayarhabby Jun 16, 2025
bc886e1
geometryCollection bug
kayarhabby Jun 16, 2025
b28f04a
resolution du bug sur l'enregistrement et l'affichage des modèles de …
kayarhabby Jun 17, 2025
04e9e8c
fix bug city
kayarhabby Jun 17, 2025
79cb87f
bug update et surbrillance des features provenant du type geometryCol…
kayarhabby Jun 17, 2025
7cbac76
fix bug surbrillance
kayarhabby Jun 18, 2025
dea590d
fix bug detail
kayarhabby Jun 18, 2025
7329658
update MaplibreObjectsLayer et MaplibreFileLoader
kayarhabby Jun 19, 2025
408c878
fix bug update carte
kayarhabby Jun 19, 2025
93500b3
fix bug fitbounds lors d'un doubleclk
kayarhabby Jun 19, 2025
26e7a1c
fix bug layerControl
kayarhabby Jun 19, 2025
12effe4
add MaplibreScreenshotController, update base et mapentity_list
kayarhabby Jun 19, 2025
af9da1f
update position controller screenshot
kayarhabby Jun 19, 2025
d171f9b
update MaplibreScreenshotController
kayarhabby Jun 23, 2025
c085431
fix bug onClick dans MaplibreObjectsLayer et réorganisation des contr…
kayarhabby Jun 23, 2025
8c5d340
update
kayarhabby Jun 24, 2025
3afd9bf
Mise en place de restoreFullContext
kayarhabby Jun 24, 2025
34897b4
context update
kayarhabby Jun 24, 2025
7e69709
update
kayarhabby Jun 24, 2025
a85d7b3
update
kayarhabby Jun 24, 2025
61740ea
update MalibreScreenshotController
kayarhabby Jun 24, 2025
8634288
update MalipreMapentityMap, MaplibreMapentityHelpers, gestion finalis…
kayarhabby Jun 25, 2025
d0e24ba
update restoreFullContext
kayarhabby Jun 25, 2025
9097a99
update
kayarhabby Jun 25, 2025
6989f9c
update
kayarhabby Jul 1, 2025
6481e6b
update
kayarhabby Jul 2, 2025
e69feb3
remplacement de maplibre-gl-draw par maplibre-geoman
kayarhabby Jul 2, 2025
709cb22
modification de la logique d'initialisation afin que cela fonctionne …
kayarhabby Jul 2, 2025
f76428d
gestion du livetracking au niveau du formulaire
kayarhabby Jul 6, 2025
82d7eba
update
kayarhabby Jul 6, 2025
57e3237
gestion surbrillance au niveau du widget
kayarhabby Jul 7, 2025
283dd09
update : fin de la reproduction de la page formulaire
kayarhabby Jul 7, 2025
24b867a
Update
kayarhabby Jul 8, 2025
8a64b1d
Documentation du code
kayarhabby Jul 8, 2025
5db88c2
update
kayarhabby Jul 8, 2025
b25316b
Update
kayarhabby Jul 8, 2025
1eafa38
update
kayarhabby Jul 8, 2025
6a24d1f
update
kayarhabby Jul 8, 2025
1e83ff4
update
kayarhabby Jul 9, 2025
b7acfe5
update
kayarhabby Jul 9, 2025
0430fff
patch mesuresControl
kayarhabby Jul 10, 2025
c58194f
Amélioration du controlleur de mesure
kayarhabby Jul 11, 2025
f433ae3
Fusion de FileLoader et FileLayerControl
kayarhabby Jul 12, 2025
a6ab9e4
Nettoyage du projet des fichiers leaflet
kayarhabby Jul 12, 2025
1e15fdb
fix bug settings default_tiles
kayarhabby Jul 15, 2025
6f270de
ajout d'un nouvel event
kayarhabby Jul 15, 2025
5d4e552
remise des jquery plugins
kayarhabby Jul 16, 2025
e988616
update base
kayarhabby Jul 16, 2025
a834488
centralisation de la gestion des couches dans MaplireLayerManager
kayarhabby Jul 18, 2025
b4da83f
gestion du controlleur de couche, suppression de la ligne de délimita…
kayarhabby Jul 21, 2025
7bb2d2b
prise en compte de nameHTML et de la bonne categorie de l'objet
kayarhabby Jul 21, 2025
4a89221
correction du bug de sélection de la première tuile de base
kayarhabby Jul 22, 2025
f433e40
add scroll
kayarhabby Jul 22, 2025
040c835
update
kayarhabby Jul 22, 2025
c08ceee
update
kayarhabby Jul 22, 2025
775f28a
update
kayarhabby Jul 22, 2025
72082ef
Mise en place du lazy loading des couches sur la carte
kayarhabby Jul 23, 2025
9dfe471
update files
kayarhabby Jul 24, 2025
ff6492f
update layerController
kayarhabby Jul 24, 2025
84fb525
update objectsLayer et mapentityMap
kayarhabby Jul 24, 2025
48d8118
update layer controller et style
kayarhabby Jul 24, 2025
1a19509
update layer controller
kayarhabby Jul 24, 2025
235c51b
gestion de la page détail
kayarhabby Jul 24, 2025
7062126
update page widget
kayarhabby Jul 25, 2025
a3b2325
update style
kayarhabby Jul 25, 2025
0fe5178
update
kayarhabby Jul 28, 2025
5a3b336
update GeomtryField et DrawControl
kayarhabby Jul 28, 2025
72afe1f
ajout de l'attribut modifiable et prise en compte de target_map
kayarhabby Jul 31, 2025
90c2942
update avec prise en compte des modifications entrepries dans widget.py
kayarhabby Jul 31, 2025
c8feeca
update js
kayarhabby Jul 31, 2025
c6c190c
update
kayarhabby Jul 31, 2025
07aaa27
update code after review
kayarhabby Aug 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mapentity/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def __init__(self, *args, **kwargs):
formmodel = self._meta.model
modelfield = formmodel._meta.get_field(fieldname)
needs_replace_widget = (isinstance(modelfield, GeometryField)
and not isinstance(formfield.widget, MapWidget))
and not isinstance(formfield.widget, MapWidget)) # faire gaffe à la refactorisation, garder le nom MapWidget
if needs_replace_widget:
formfield.widget = MapWidget()
if self.instance.pk and self.user:
Expand Down
3 changes: 2 additions & 1 deletion mapentity/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def duplicate(self, **kwargs):

class BaseMapEntityMixin(DuplicateMixin, models.Model):
_entity = None
capture_map_image_waitfor = '.leaflet-tile-loaded'
capture_map_image_waitfor = '.maplibre-tile-loaded' # faire attention à ceci au moment de mettre en place le control de capture

class Meta:
abstract = True
Expand Down Expand Up @@ -273,6 +273,7 @@ def get_update_url(self):
def get_delete_url(self):
return reverse(self._entity.url_name(ENTITY_DELETE), args=[str(self.pk)])

# map image
def get_map_image_extent(self, srid=API_SRID):
fieldname = app_settings['GEOM_FIELD_NAME']
obj = getattr(self, fieldname)
Expand Down
132 changes: 69 additions & 63 deletions mapentity/settings.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,73 @@
from collections import OrderedDict
from copy import deepcopy

from django.conf import settings
from django.contrib.messages import constants as messages
from django.core.exceptions import ImproperlyConfigured
from django.utils.translation import gettext_lazy as _

API_SRID = 4326

# Styles par défaut
_DEFAULT_MAP_STYLES = {
'detail': {'weight': 5, 'opacity': 1, 'color': 'yellow', 'arrowColor': '#FF5E00', 'arrowSize': 8},
'others': {'opacity': 0.9, 'fillOpacity': 0.7, 'color': 'yellow'},
'detail': {'weight': 5, 'opacity': 1, 'color': 'mediumpurple', 'arrowColor': '#FF5E00', 'arrowSize': 8},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it deliberate to change the color value?
And the opacity? (the line below)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes but i forgot to remove it. It was for test purposes.

'others': {'opacity': 0.9, 'fillOpacity': 0.5, 'color': 'yellow'},
'filelayer': {'color': 'red', 'opacity': 1.0, 'fillOpacity': 0.9, 'weight': 2, 'radius': 5},
'draw': {'color': '#35FF00', 'opacity': 0.8, 'weight': 3},
'print': {},
}

# Tuiles par défaut
_DEFAULT_TILES = [
('OSM', 'https://a.tile.openstreetmap.org/{z}/{x}/{y}.png', '© OpenStreetMap contributors'),
]

# Config MapLibre par défaut
_DEFAULT_MAPLIBRE_CONFIG = {
'BOUNDS': [[-3.630430, 40.120372], [3.208008, 45.061882]],
'DEFAULT_CENTER': [1.3952, 43.5963],
'DEFAULT_ZOOM': 5,
'SCALE': 'metric',
'TILES': _DEFAULT_TILES,
}

# Merge sécurisé : MAPLIBRE_CONFIG_OVERRIDES
MAPLIBRE_CONFIG = deepcopy(_DEFAULT_MAPLIBRE_CONFIG)

user_config = getattr(settings, 'MAPLIBRE_CONFIG_OVERRIDES', {})

for key in user_config:
if key in MAPLIBRE_CONFIG:
MAPLIBRE_CONFIG[key] = user_config[key]
else:
raise ImproperlyConfigured(f"MAPLIBRE_CONFIG_OVERRIDES contains an unknown key: {key}")

# Validation des champs
BOUNDS = MAPLIBRE_CONFIG.get("BOUNDS")
if BOUNDS is not None:
if not isinstance(BOUNDS, (list, tuple)) or len(BOUNDS) != 2:
raise ImproperlyConfigured(_("BOUNDS must be a list or tuple of two [lon, lat] coordinate pairs."))
for point in BOUNDS:
if not isinstance(point, (list, tuple)) or len(point) != 2:
raise ImproperlyConfigured(_("Each point in BOUNDS must be a list or tuple with two floats (lon, lat)."))

DEFAULT_CENTER = MAPLIBRE_CONFIG.get("DEFAULT_CENTER")
if not (isinstance(DEFAULT_CENTER, (list, tuple)) and len(DEFAULT_CENTER) == 2):
raise ImproperlyConfigured("MAPLIBRE_CONFIG['DEFAULT_CENTER'] must be a list/tuple with two elements - (lon, lat)")

DEFAULT_ZOOM = MAPLIBRE_CONFIG.get("DEFAULT_ZOOM")
if not (isinstance(DEFAULT_ZOOM, int) and (1 <= DEFAULT_ZOOM <= 24)):
raise ImproperlyConfigured("MAPLIBRE_CONFIG['DEFAULT_ZOOM'] must be an int between 1 and 24.")

SCALE = MAPLIBRE_CONFIG.get("SCALE")
if SCALE is True:
MAPLIBRE_CONFIG["SCALE"] = 'metric'
elif SCALE not in ('metric', 'imperial', None, False):
raise ImproperlyConfigured("MAPLIBRE_CONFIG['SCALE'] must be True, False, None, 'metric', or 'imperial'")

if isinstance(MAPLIBRE_CONFIG.get('TILES'), str):
MAPLIBRE_CONFIG['TILES'] = [(_('Background'), MAPLIBRE_CONFIG.get('TILES'), '')]

# App settings généraux
app_settings = dict({
'TITLE': "Mapentity",
'HISTORY_ITEMS_MAX': 5,
Expand All @@ -28,7 +82,7 @@
'TEMP_DIR': getattr(settings, 'TEMP_DIR', '/tmp'),
'MAP_CAPTURE_SIZE': 800,
'MAP_CAPTURE_MAX_RATIO': 1.25,
'GEOM_FIELD_NAME': 'geom',
'GEOM_FIELD_NAME': 'geom', # Nom du champ géométrique - utilisé pour début du nom de l'id de la carte qui vaut "geom-map
'GPX_FIELD_NAME': 'geom',
'DATE_UPDATE_FIELD_NAME': 'date_update',
'MAP_BACKGROUND_FOGGED': False,
Expand All @@ -46,15 +100,21 @@
'REGEX_PATH_ATTACHMENTS': r'\.\d+x\d+_q\d+(_crop)?\.(jpg|png|jpeg|bmp|webp)$',
'MAX_CHARACTERS': None,
'MAX_CHARACTERS_BY_FIELD': {},
'MAPLIBRE_CONFIG': MAPLIBRE_CONFIG,
}, **getattr(settings, 'MAPENTITY_CONFIG', {}))

# default MAP_STYLES should not be replaced but updated by MAPENTITY_CONFIG
# Merge sécurisé MAP_STYLES
_MAP_STYLES = deepcopy(_DEFAULT_MAP_STYLES)
_MAP_STYLES.update(app_settings['MAP_STYLES'])
app_settings['MAP_STYLES'] = _MAP_STYLES

CRISPY_TEMPLATE_PACK = 'bootstrap4'
for name, override in getattr(settings, 'MAP_STYLES', {}).items():
merged = app_settings['MAP_STYLES'].get(name, {})
merged.update(override)
app_settings['MAP_STYLES'][name] = merged


## config Tinymce
TINYMCE_DEFAULT_CONFIG = {
"theme": "silver",
"height": 500,
Expand Down Expand Up @@ -82,7 +142,7 @@
TINYMCE_DEFAULT_CONFIG.update(getattr(settings, 'TINYMCE_DEFAULT_CONFIG', {}))
setattr(settings, 'TINYMCE_DEFAULT_CONFIG', TINYMCE_DEFAULT_CONFIG)


# config Rest_Framework
REST_FRAMEWORK_DEFAULT_CONFIG = {
# Use Django's standard `django.contrib.auth` permissions,
# or allow read-only access for unauthenticated users.
Expand All @@ -97,62 +157,6 @@
REST_FRAMEWORK_DEFAULT_CONFIG.update(getattr(settings, 'REST_FRAMEWORK', {}))
setattr(settings, 'REST_FRAMEWORK', REST_FRAMEWORK_DEFAULT_CONFIG)

for name, override in getattr(settings, 'MAP_STYLES', {}).items():
# fallback old settings MAP_STYLES
merged = app_settings['MAP_STYLES'].get(name, {})
merged.update(override)
app_settings['MAP_STYLES'][name] = merged

_LEAFLET_PLUGINS = OrderedDict([
('leaflet.overintent', {
'js': 'mapentity/Leaflet.OverIntent/leaflet.overintent.js',
}),
('leaflet.label', {
'css': 'mapentity/Leaflet.label/dist/leaflet.label.css',
'js': 'mapentity/Leaflet.label/dist/leaflet.label.js'
}),
('leaflet.spin', {
'js': ['paperclip/spin.min.js',
'mapentity/Leaflet.Spin/leaflet.spin.js']
}),
('leaflet.layerindex', {
'js': ['mapentity/RTree/src/rtree.js',
'mapentity/Leaflet.LayerIndex/leaflet.layerindex.js']
}),
('leaflet.filelayer', {
'js': ['mapentity/togeojson/togeojson.js',
'mapentity/Leaflet.FileLayer/leaflet.filelayer.js']
}),
('leaflet.geometryutil', {
'js': 'mapentity/Leaflet.GeometryUtil/dist/leaflet.geometryutil.js'
}),
('forms', {}),
('leaflet.snap', {
'js': 'mapentity/Leaflet.Snap/leaflet.snap.js'
}),
('leaflet.measurecontrol', {
'css': 'mapentity/Leaflet.MeasureControl/leaflet.measurecontrol.css',
'js': 'mapentity/Leaflet.MeasureControl/leaflet.measurecontrol.js'
}),
('leaflet.fullscreen', {
'css': 'mapentity/leaflet.fullscreen/Control.FullScreen.css',
'js': 'mapentity/leaflet.fullscreen/Control.FullScreen.js'
}),
('leaflet.groupedlayercontrol', {
'css': 'mapentity/Leaflet.groupedlayercontrol/src/leaflet.groupedlayercontrol.css',
'js': 'mapentity/Leaflet.groupedlayercontrol/src/leaflet.groupedlayercontrol.js'
}),
('mapentity', {
'js': ['mapentity/mapentity.js',
'mapentity/mapentity.forms.js'],
})
])

_LEAFLET_CONFIG = getattr(settings, 'LEAFLET_CONFIG', {})
_LEAFLET_PLUGINS.update(_LEAFLET_CONFIG.get('PLUGINS', {})) # mapentity plugins first
_LEAFLET_CONFIG['PLUGINS'] = _LEAFLET_PLUGINS
setattr(settings, 'LEAFLET_CONFIG', _LEAFLET_CONFIG)

# MODELTRANSLATION config
_MODELTRANSLATION_LANGUAGES = getattr(settings, 'MODELTRANSLATION_LANGUAGES', tuple(x[0] for x in settings.LANGUAGES))
_MODELTRANSLATION_DEFAULT_LANGUAGE = getattr(settings, 'MODELTRANSLATION_DEFAULT_LANGUAGE',
Expand All @@ -172,6 +176,8 @@
setattr(settings, 'MESSAGE_TAGS', _MESSAGE_TAGS)

# crispy form default config with bootstrap4
CRISPY_TEMPLATE_PACK = 'bootstrap4'

_CRISPY_ALLOWED_TEMPLATE_PACKS = getattr(settings, 'CRISPY_ALLOWED_TEMPLATE_PACKS', ('bootstrap4', ))
setattr(settings, 'CRISPY_ALLOWED_TEMPLATE_PACKS', _CRISPY_ALLOWED_TEMPLATE_PACKS)

Expand Down
9 changes: 0 additions & 9 deletions mapentity/static/mapentity/Leaflet.FileLayer/LICENSE

This file was deleted.

40 changes: 0 additions & 40 deletions mapentity/static/mapentity/Leaflet.FileLayer/README.md

This file was deleted.

Loading