Hi,

I skimmed through the Google Maps Playground site in AJAX. I just
rewrote some of the sample code and added it to my website.

The problem I'm having now is that, while the map works fine on IE, it
doesn't want to work with Google Chrome. I don't have any of the other
browsers, but it might not work with Firefox or Safari, etc. My goal
is to make it work for every browser, since I work at a college.

I'm wondering what I can include to make it work. Thanks for any help
you can give me.

Here is the link:

http://www.thomas.edu/geninfo/directions2.asp

Here is the code:

<script type="text/javascript">

    var map;
    var myPano;
    var panoClient;
    var nextPanoId;

    function initialize() {
      var thomasCollege = new GLatLng(44.524481,-69.664029);
      var admissPOV = {yaw:106.64659986187695,pitch:-10};

      panoClient = new GStreetviewClient();

      map = new GMap2(document.getElementById("map_canvas"));
      map.setCenter(thomasCollege, 15);
      map.addControl(new GSmallMapControl());
      map.addControl(new GMapTypeControl());
      GEvent.addListener(map, "click", function(overlay,latlng) {
        panoClient.getNearestPanorama(latlng, showPanoData);
      });

      myPano = new GStreetviewPanorama(document.getElementById
("pano"));
      myPano.setLocationAndPOV(thomasCollege, admissPOV);
      GEvent.addListener(myPano, "error", handleNoFlash);
      panoClient.getNearestPanorama(thomasCollege, showPanoData);
    }

    function showPanoData(panoData) {
      if (panoData.code != 200) {
        GLog.write('showPanoData: Server rejected with code: ' +
panoData.code);
        return;
      }
      nextPanoId = panoData.links[0].panoId;
      map.openInfoWindowHtml(panoData.location.latlng, displayString);
      myPano.setLocationAndPOV(panoData.location.latlng);
    }

    function next() {
      panoClient.getPanoramaById(nextPanoId, showPanoData);
    }

    function handleNoFlash(errorCode) {
      if (errorCode == 603) {
        alert("Error: Flash doesn't appear to be supported by your
browser");
        return;
      }
    }

    </script>

Thanks again.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to