Question

Just wondering how I can fix this problem, I have a panel which has clickable links to street view areas in my local neighborhood. When the user clicks a link I pass an array of options to the steetViewPanorama setoptions method.

 localTour.setOptions(locations[i]);

This works and displays the correct location, the issue is that I am getting graphic glitches. Similar to screen tearing / tiles overlapping each other. Currently the only way that I can fix this is by clicking the link twice.

I have tried to force a re-render of the map by calling the

 localTour.setZoom(localTour.getZoom())

and then triggering the re-size event on the localTour map but neither fix the graphical glitches. Surprisingly this issue doesn't happen in Firefox although firefox renders the streetview different (something to do with canvas and field of view) [Source]

Here is an example of the graphical glitch that occurs when switching locations: Graphical glitch / tile overlap

Was it helpful?

Solution

try this

google.maps.event.trigger(localTour, 'resize');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top