From 71c728d56cca17b6497d310a677ae6d951aa4fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Vigh?= Date: Sun, 9 May 2021 11:46:03 +0200 Subject: [PATCH] reverted removal of preference for outdoor panorama in the front end --- public/static/js/map_editor.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/public/static/js/map_editor.js b/public/static/js/map_editor.js index 32e7f48..433bc05 100644 --- a/public/static/js/map_editor.js +++ b/public/static/js/map_editor.js @@ -80,16 +80,22 @@ MapEditor.panorama.setPano(panoLocationData.pano); }, - requestPanoData: function (location) { + requestPanoData: function (location, canBeIndoor) { var sv = new google.maps.StreetViewService(); sv.getPanorama({ location: location, preference: google.maps.StreetViewPreference.NEAREST, radius: MapEditor.map.getSearchRadius(location), + source: canBeIndoor ? google.maps.StreetViewSource.DEFAULT : google.maps.StreetViewSource.OUTDOOR }, function (data, status) { var panoLocationData = status === google.maps.StreetViewStatus.OK ? data.location : null; + if (panoLocationData === null && !canBeIndoor) { + MapEditor.requestPanoData(location, true); + return; + } + document.getElementById('loading').style.visibility = 'hidden'; MapEditor.loadPanoForNewPlace(panoLocationData); -- 2.45.2