When a google map has a street view object explicitly defined with
correct position and pov:
<div style="width:400px;height:300px;" id="map_canvas"></div>
<div style="width:400px;height:300px;" id="pano"></div>
<script>
var fenway = new google.maps.LatLng(42.345573,-71.098326);
var mapOptions = {
center: fenway,
zoom: 14,
mapTypeId: google.maps.MapTypeId.ROADMAP,
streetViewControl: true
};
var map = new google.maps.Map(
document.getElementById("map_canvas"), mapOptions);
var panoramaOptions = {
position: fenway,
pov: {
heading: 34,
pitch: 10,
zoom: 1
}
};
var panorama = new
google.maps.StreetViewPanorama(document.getElementById("pano"),
panoramaOptions);
map.setStreetView(panorama);
</script>
I think the only method to show the street view object on
initialization without user interaction is to call to setVisible()
when the page has loaded:
panorama.setVisible(true);
but using this, the pegman is not placed on the defined position. Is
it possible to use any method in order to automatically move the
pegman icon from the pegman control to the set position without user
interaction?
Thanks in advance.
--
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.