title: Replacing GTileLayer in Google Maps v3, with ImageMapType, Tile bounding box?
body: <p><strong>I need to update this code:</strong></p>
  
  <pre><code>radar_layer.getTileUrl=function(tile,zoom) {
  
      var llp = new GPoint(tile.x*256,(tile.y+1)*256);
      var urp = new GPoint((tile.x+1)*256,tile.y*256);
      var ll = G_NORMAL_MAP.getProjection().fromPixelToLatLng(llp,zoom);
      var ur = G_NORMAL_MAP.getProjection().fromPixelToLatLng(urp,zoom);
      var dt = new Date();
      var nowtime = dt.getTime();
  
      var tileurl = "http://demo.remoteservice.com/cgi-bin/serve.cgi?";
          tileurl+="bbox="+ll.lng()+","+ll.lat()+","+ur.lng()+","+ur.lat();
          tileurl+="&amp;width=256&amp;height=256&amp;reaspect=false&amp;cachetime="+nowtime;
  
      return tileurl;
  };
  </code></pre>
  
  <p><strong>I got as far as:</strong></p>
  
  <pre><code>var DemoLayer = new google.maps.ImageMapType({
  
       getTileUrl: function(coord, zoom) {
  
       var llp = new google.maps.Point(coord.x*256,(coord.y+1)*256);
       var urp = new google.maps.Point((coord.x+1)*256,coord.y*256);
       var ll = googleMap.getProjection().fromPointToLatLng(llp);
       var ur = googleMap.getProjection().fromPointToLatLng(urp);
       var dt = new Date();
       var nowtime = dt.getTime();
  
       var tileurl = "http://demo.remoteservice.com/cgi-bin/serve.cgi?";
           tileurl+="bbox="+ll.lng()+","+ll.lat()+","+ur.lng()+","+ur.lat();
    tileurl+="&amp;width=256&amp;height=256&amp;reaspect=false&amp;cachetime="+nowtime;
  
       return tileurl;
  
       },
               tileSize: new google.maps.Size(256, 256),
               opacity:1.0,
               isPng: true
           });
  </code></pre>
  
  <p>Specifically, I need help with this section:</p>
  
  <pre><code>var llp = new google.maps.Point(coord.x*256,(coord.y+1)*256);
   var urp = new google.maps.Point((coord.x+1)*256,coord.y*256);
   var ll = googleMap.getProjection().fromPointToLatLng(llp);
   var ur = googleMap.getProjection().fromPointToLatLng(urp);
  </code></pre>
  
  <p>The service wants the tile bounding box from what I understand. However, ll and ur do not seem to correct at all.</p>
  
  <p>I had it working and displaying the entire map bounding box in each tile, but of course that's not what I need.</p>
  
  <p>Any insight here would be greatly appreciated, not having the GTileLayers in V3 is fine if I can work around it, until then I'm frustrated.</p>