The new StreetViewService will help you do this:

var streetViewLocation = new google.maps.LatLng(-33.867386,
151.195767);
var nearestLatLng = null;
var nearestPano = null;
var client = new google.maps.StreetViewService();
client.getNearestPanorama(streetViewLocation, 50, function(result,
status) {
  if (status == google.maps.StreetViewStatus.OK) {
    nearestPano = result.location.pano;
    nearestLatLng = result.location.latLng;
  }
});

nearestLatLng will contains the nearest Street View panorama available
within 50m of the streetViewLocation LatLng given in
getNearestPanorama.

On Jun 1, 5:49 pm, dbrb2 <[email protected]> wrote:
> Hello,
>
> I'm not sure whether the accuracy of thestreetviewsystem allows for
> this - astreetviewset to a specific lat/lon, as well as a marker on
> the panorama at the same lat/lon.
>
> I assume that when I call thestreetview.setPosition the nearest
> availablestreetviewposition is returned. Is there any way that I can
> automatically set the POV of mystreetviewso that when it loads, it
> is pointing towards the marker I have placed? Since both the marker
> and the panorama have been requested using the same lat/lon I can't
> calculate the bearing myself - unless I can find the actual lat/lon of
> the panorama position I have ended up at...

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to