границы пргр по настройке

This commit is contained in:
zakhy 2025-01-15 09:39:50 +07:00
parent 826718dea2
commit a7a69786a9
2 changed files with 5 additions and 3 deletions

View File

@ -318,7 +318,7 @@
mineBorderLayer = new ol.layer.Vector({
source: new ol.source.Vector({
url: '/static/border.kml/',
url: '{{ kml_path }}',
format: new ol.format.KML({extractStyles: false}),
}),

View File

@ -26,14 +26,16 @@ def mainindex(request):
try:
if request.method == "GET":
lon = str(float(settingsmodule.get_settings('longitude',
'86.10111978605353'))) # долгота центра
'86.10111978605353'))) # долгота центра
lat = str(float(settingsmodule.get_settings('latitude',
'55.344251210827814'))) # широта
'55.344251210827814'))) # широта
kml_path = settingsmodule.get_settings('kml_path', '')
context = generalmodule.get_context_template()
context.update({
'lon': lon.replace(',', '.'),
'lat': lat.replace(',', '.'),
'kml_path': kml_path,
'updatepage': True,
})
return render(request, 'main_index.html', context)