Thanks Mike. The var in front of the point wasn't there originally. I jsut added it to see if it would override the last point loaded in the load function...
I've removed the var and also put point = ''; at the bottom of the load and loadStreetView functions but it still loads fletcher street. Is there anyway to clear the details from the last point? thanks ben On Sep 24, 6:23 pm, ProbablyMike <[email protected]> wrote: > I think it's a problem with variable scope. > > In your loadStreetView function you have: > var point = new GLatLng(place.Point.coordinates[1], > place.Point.coordinates[0]); > > But that is defined within the return function of > geocoder_sv.getLocations so is only visible within that function. > > Then you have: > panoramaOptions = { latlng: point }; > > But this will not be using the point variable defined above, but the > one from: > point = new GLatLng(place.Point.coordinates[1], in the load function, > which will always be the last address geocoded on load. > > I think as you don't actually var that point variable it is > automatically global. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" 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-api?hl=en -~----------~----~----~----~------~----~------~--~---
