Google Streetview under V3 Code having hiccups and delays

Posted by jeffkee on Stack Overflow See other posts from Stack Overflow or by jeffkee
Published on 2010-06-11T01:31:41Z Indexed on 2010/06/11 1:32 UTC
Read the original article Hit count: 699

http://new.brocksmeaton.com/showlisting.php/196/-7210-Arbutus-Place-Whytecliff-West-Vancouver-west-vancouver-real-estate

The really odd thing is I had this working yesterday and today it's not working. I'm using jQuery UI to switch the tabs on the location map/street view module. I've recently upgraded the Google Maps code as well as the Google Streetview code to version 3.

So when I open it in Firefox, with Firebug on, as soon as I switch to the Streetview tab, the navigation and zoom in out controls show, but nothing shows.. and then when I try to drag the map around, it does not move around, but instead, causes errors in Firebug: "too much recursion".

So it causes the whole browser to become buggy, slows down, and the errors happen, and nothing shows on the streetview pane.

Most of the map loading code is located in inline Javascript on the page itself. Some of the code is under showlisting.js

<script type="text/javascript" src="/js/showlisting.js"></script>

<script type="text/javascript">
// Call this function when the page has been loaded
function loadmap() {

 var latlng = new google.maps.LatLng(49.374918567425475, -123.28996885871596);
    var myOptions = {
      zoom: 14,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById('listingmap'), myOptions);

 var listingicon = '/images/activehouse.png';

 var infowindow = new google.maps.InfoWindow();

 homemarker = new google.maps.Marker({position: latlng, map: map, icon: listingicon});
 google.maps.event.addListener(homemarker, 'click', function() {
 infowindow.setContent('<div style="height:80px; width:250px; color:#333;"><p>7210 Arbutus Place<br />Whytecliff, West Vancouver</div>')
 infowindow.open(map,homemarker);
 });
}


function loadpano() {

var latlng = new google.maps.LatLng(49.374918567425475, -123.28996885871596);

$('#listingpanorama').slideDown(500, function() {
 var panoramaOptions = {
  addressControl:false,
  position: latlng,
  pov: {
   heading: 34,
   pitch: 30,
   zoom: 1
  }
 };
 var panorama = new  google.maps.StreetViewPanorama(document.getElementById('listingpanorama'), panoramaOptions);


 });

 return false;
}

</script>

My old one under GOogle API Version 2 is here FYI if you want to take a look at it: http://demo.brixwork.com/master/showlisting.php/63/1701-388-Drake-Street-False-Creek-North-Vancouver-

© Stack Overflow or respective owner

Related posts about google-maps

Related posts about google-api