Compare commits
2 Commits
216d30329f
...
94624d5b2c
Author | SHA1 | Date | |
---|---|---|---|
94624d5b2c | |||
71c728d56c |
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user