ma...@creatiworks.ca
unread,Mar 21, 2011, 11:05:29 PM3/21/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-map...@googlegroups.com, Rossko
I tried it but it didn't seem to help
here's my code maybe I'm doing something wrong
this is the initialize and start application functions which is where i assume you would put the setPosition function call
the POV is set already in panoOptions and really only sets the camera orientation anyway so really the only thing that will help here is setPosition.
I've tried setPosition(storefront) in several different locations in that code and it does nothing. it actually breaks the link between the streetview and my custom panoramas
storefront is the name of the panorama object that i want to start at.
you can see the full javascript code tho if you view my source on the site and look at the js.
[code]
var carbonear_intersection = new google.maps.LatLng(47.724158,
-53.24083);
var storefront = new google.maps.LatLng(yaddayadda);
var etc etc....
there's alot of them
function initialize() {
startApplication();
// Define how far to search for an initial pano from a location, in meters.
var panoSearchRadius = 30;
// Create a StreetViewService object.
var client = new google.maps.StreetViewService();
// Compute the nearest panorama to the Google Sydney office
// using the service and store that pano ID. Once that value
// is determined, load the application.
client.getPanoramaByLocation(carbonear_intersection, panoSearchRadius, function(result, status) {
if (status == google.maps.StreetViewStatus.OK) {
entryPanoId = result.location.pano;
}
});
}
function startApplication() {
// Set up the map and enable the Street View control.
var mapOptions = {
center: carbonear_intersection,
zoom: 7,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
// Get the default StreetViewPanorama object.
panorama = map.getStreetView();
// Set up Street View and initially set it visible. Register the
// custom panorama provider function. Update the StreetViewPanorama.
var panoOptions = {
position: carbonear_intersection,
visible: true,
panoProvider: getCustomPanorama,
pov: {heading:30, pitch:0, zoom:2},
addressControl: false,
enableCloseButton: false
}
panorama.setOptions(panoOptions);
// We'll monitor the links_changed event to check if the current pano is either
// a custom pano or our entry pano.
google.maps.event.addListener(panorama, 'links_changed', createCustomLinks);
}
[/code]