I have a custom panorama which shows outside of a building (street view). When I do:
panorama.setPano(myPano);
panorama.setPosition(myLatLng);
it starts showing my panorama but after a second stops and shows google's own street view. I found out setPosition method is triggering google street view. Without it, my pano is shown perfectly.
Is there any way to turn off or disable google data or StreetViewService or whatever is conflicting with my custom panorama?
thanks!
There's a note about it here: https://developers.google.com/maps/documentation/javascript/streetview#CustomPanoramaMethod
do not directly set a position on the StreetViewPanorama when you wish to display custom panoramas, as such a position will instruct the Street View service to request the default Street View imagery close to that location. Instead, set this position within the custom StreetViewPanoramaData's location.latLng field.
So just set pano object like you did before:
panorama.setPano(myPano);
and that's it, Streetview will use the position you specified in the pano object.