I have a little web app called StreetViewSafari which has a StreetViewPanorama and a Map on the screen and am having trouble determining how to set the PanoramaId(cam location) and POV(cam perspective) at the same time and have all the tiles load correctly. I've tried many different ways to do this and am currently settings the setOptions method.
As you can see on the site, the functionality between Firefox and Chrome are drastic. Chrome seems to load blotchy tiles which can be reproduced by using the "Show Next" button on the web app. Firefox has no problem loading the tiles.
I'd like to know if there is a better way that keep both browsers happy, or if I should escalate this issue to Google support.
For Example:
var options: google.maps.StreetViewPanoramaOptions = {
pano: loadedScene.panoId, //an id
pov: loadedScene.getStreetViewPov() //a valid POV object
};
panorama.setOptions(options);
Cheers, Kevin
Basically:
although you call a single method(setOptions
) this method will set the options one by one.
But as it seems the issue is the opposite, the options will be set too quick.
For me the result is much better when I set the pov again with a short delay(it seems to force a kind of re-rendering)
var options = {
pano: loadedScene.panoId,
pov: loadedScene.getStreetViewPov()
};
panorama.setOptions(options);
setTimeout(function() {
panorama.setPov(options.pov);
}, 500);