Добавил плавную анимацию для нескольких источников
This commit is contained in:
@@ -422,6 +422,28 @@ class ShowSourceAveragingStepsMapView(LoginRequiredMixin, View):
|
||||
return render(request, "mainapp/source_averaging_map.html", context)
|
||||
|
||||
|
||||
class MultiSourcesPlaybackMapView(LoginRequiredMixin, View):
|
||||
"""View for displaying animated playback of multiple sources on map."""
|
||||
|
||||
def get(self, request):
|
||||
from ..models import Source
|
||||
|
||||
ids = request.GET.get("ids", "")
|
||||
|
||||
if not ids:
|
||||
return redirect("mainapp:source_list")
|
||||
|
||||
id_list = [int(x) for x in ids.split(",") if x.isdigit()]
|
||||
if not id_list:
|
||||
return redirect("mainapp:source_list")
|
||||
|
||||
context = {
|
||||
"source_ids": ",".join(str(x) for x in id_list),
|
||||
"source_count": len(id_list),
|
||||
}
|
||||
return render(request, "mainapp/multi_sources_playback_map.html", context)
|
||||
|
||||
|
||||
# class ClusterTestView(LoginRequiredMixin, View):
|
||||
# """Test view for clustering functionality."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user