title: How can I fix this JavaScript syntax error?
body: <p>This is puzzling me. I'm using Google Map's Geocoding to find locations. I am attempting to use the example <a href="http://code.google.com/apis/maps/documentation/services.html#Geocoding" rel="nofollow noreferrer">here</a>, which is from Google, and it is just not working for me.</p>
  <hr />
  <h3>Error:</h3>
  <blockquote>
  <p><a href="http://maps.gstatic.com/intl/en_us/mapfiles/159e/maps2.api/main.js" rel="nofollow noreferrer">http://maps.gstatic.com/intl/en_us/mapfiles/159e/maps2.api/main.js</a><br />
  Line 174<br />
  var point = new GLatLng(,);</p>
  </blockquote>
  <hr />
  <h3>Code:</h3>
  <pre><code>&lt;script src=&quot;http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key='.$config['locations.gMaps.key'].'&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
  &lt;script src=&quot;http://www.google.com/uds/api?file=uds.js&amp;v=1.0&amp;key='.$config['locations.gMaps.key'].'&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
  &lt;script src=&quot;http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
  
  &lt;style type=&quot;text/css&quot;&gt;
      @import url(&quot;http://www.google.com/uds/css/gsearch.css&quot;);
      @import url(&quot;http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css&quot;);
  &lt;/style&gt;
  &lt;script type=&quot;text/javascript&quot;&gt;
  
      function addListener(element, baseName, handler) {
          if (element.addEventListener)
              element.addEventListener(baseName, handler, false);
          else if (element.attachEvent)
              element.attachEvent(&quot;on&quot;+baseName,handler);
      }
      
      var map'.$num.';    
      
      function initialize'.$num.'() 
      {
      
          if (GBrowserIsCompatible()) 
          {
              map'.$num.' = new GMap2(document.getElementById(&quot;google_map'.$num.'&quot;),{mapTypes:[G_HYBRID_MAP]});
              var point = new GLatLng('.$row-&gt;LocationLat.','.$row-&gt;LocationLon.');
              map'.$num.'.setCenter(new GLatLng('.$row-&gt;LocationLat.','.$row-&gt;LocationLon.'),4);
              var mapControl = new GMapTypeControl();
              map'.$num.'.addControl(mapControl);
              map'.$num.'.addControl(new GLargeMapControl());
              map'.$num.'.addControl(new GOverviewMapControl());
              map'.$num.'.enableDoubleClickZoom();
              map'.$num.'.enableScrollWheelZoom();
              var bounds = new GLatLngBounds;
              
              var myIcon = new GIcon();
              myIcon.image = &quot;http://www.google.com/mapfiles/marker.png&quot;;
              myIcon.iconAnchor = new GPoint((markerImage1.width/2),markerImage1.height);
              
              
              
              bounds.extend(point);
              setBounds(map'.$num.',bounds);                              
              
              var address = &quot;' . $address . '&quot;;
              
              
              var geocoder = new GClientGeocoder();
              showAddress(address, geocoder);
              
          }
      }
      
      function showAddress(address, geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + &quot; not found&quot;);
            } else {
              map'.$num.'.setCenter(point, 13);
              var marker = new GMarker(point);
              map'.$num.'.addOverlay(marker);
              marker.openInfoWindowHtml(address);
            }
          }
        );
      }
  
                  
      function setBounds(map'.$num.',bounds) 
      {
          map'.$num.'.setZoom(15);
          map'.$num.'.setCenter(bounds.getCenter());
      }                   
  
      function chargement() 
      {   
          markerImage1 = new Image(); 
          markerImage1.src = &quot;http://www.google.com/mapfiles/marker.png&quot;;
          setTimeout(&quot;initialize'.$num.'()&quot;, 500); 
      }
  
      addListener(window, &quot;load&quot;, chargement);
  &lt;/script&gt;
  </code></pre>
  <p>My code is generated by PHP, so when there is an ' that means I'm opening or closing the string that is holding the JavaScript.</p>