GoogleMapAPIv3 Streetview Loaded Event
im creating a website and am using a streetview panorama on it. Now some of my target users may not have the fastest internet available so what i want to do is display a pretty loading screen while the panorama fully loads. however i couldnt find any events that fire once a streetview panorama loads.
Is ther开发者_JS百科e one? or if not, how would i create a faux event that fires when a panorama is fully loaded
Thanks
As noted on this question the StreetView SDK doesn't fire any event when the street view is finished loading.
I do it and it works like a charm. There is actually one way to achieve "loaded" event by using the Streetview service like this:
// Handle loaded-like event
var sv = new google.maps.StreetViewService();
sv.getPanorama({location: camera.eye, radius: 50}, function (data, status) {
if (status !== 'OK') {
console.log(`Streetview processSVData status = ${status}`);
return;
}
alert(`Streetview loaded! — processSVData status = ${status}`);
}
精彩评论