|
@@ -24,21 +24,6 @@ class PanoramaView(DetailView):
|
|
context_object_name = "panorama"
|
|
context_object_name = "panorama"
|
|
|
|
|
|
|
|
|
|
-def pano_json(request, pk):
|
|
|
|
- pano = get_object_or_404(Panorama, pk=pk)
|
|
|
|
- return JsonResponse(pano.to_dict())
|
|
|
|
-
|
|
|
|
-def pano_refpoints(request, pk):
|
|
|
|
- """Returns the reference points that are close to the given panorama, as a
|
|
|
|
- JSON object. Each reference point also includes information relative
|
|
|
|
- to the given panorama (bearing, elevation, distance).
|
|
|
|
- """
|
|
|
|
- pano = get_object_or_404(Panorama, pk=pk)
|
|
|
|
- refpoints = [r.to_dict_extended(pano) for r in ReferencePoint.objects.all()
|
|
|
|
- if r.line_distance(pano) <= settings.PANORAMA_MAX_DISTANCE]
|
|
|
|
- return JsonResponse(refpoints, safe=False)
|
|
|
|
-
|
|
|
|
-
|
|
|
|
class PanoramaGenTiles(RedirectView):
|
|
class PanoramaGenTiles(RedirectView):
|
|
permanent = False
|
|
permanent = False
|
|
pattern_name = "panorama:list"
|
|
pattern_name = "panorama:list"
|
|
@@ -53,5 +38,3 @@ class PanoramaList(ListView):
|
|
model = Panorama
|
|
model = Panorama
|
|
template_name = "panorama/list.html"
|
|
template_name = "panorama/list.html"
|
|
context_object_name = "panoramas"
|
|
context_object_name = "panoramas"
|
|
-
|
|
|
|
-
|
|
|