google maps not working anymore at the drop of a hat

Posted by Vordreller on Stack Overflow See other posts from Stack Overflow or by Vordreller
Published on 2009-03-19T00:07:21Z Indexed on 2010/04/08 15:43 UTC
Read the original article Hit count: 297

Filed under:
|

2 days ago, I was working on a project that involves google maps. The website showed the maps on the pages just fine.

Now, I come back to my workstation, nothing has changed, expect for the fact that the google maps won't show up anymore. The code is identical, nobody has touched my machine since I was gone, I've checked the html, everything is perfect and still this isn't working... The Javascript console is giving no errors and the code is identical to a backup I make everytime I call it a day. 2 days ago it was working, today it isn't.

I've even copied the source code, put it into an html file and tried that, but the same result. I'm at a loss here. This is my code:

<script type="text/javascript">
      //<![CDATA[
      var map;
      var directionsPanel;
      var directions;

      function initialize() {
        if (GBrowserIsCompatible()) {
         map = new GMap2(document.getElementById("map"));
         map.addControl(new GLargeMapControl());
         map.addControl(new GScaleControl());
         map.addControl(new GMapTypeControl());

         //the route description
         directionsPanel = document.getElementById("route");
         directions = new GDirections(map, directionsPanel);
         directions.load({COMMAND});
        }
      }
      //]]>
    </script>

The {COMMAND} is something that the PHP template will parse, I've checked it, the format is 100% correct and like I allready said, code now is identical to the backup, and if it worked back then, it should work now.

Did google update their API overnight and did a function that I use here become deprecated? I don't know what's going on here...

© Stack Overflow or respective owner

Related posts about php

Related posts about google-maps