You'll want to wrap the x coordinate. Assuming you're using the default
projection, you can calculate the number of tiles horizontally across the
earth at a particular zoom level with:
1 << zoom
or
Math.pow(2, zoom)

Then use the mod operator. Something like:
{
  getTileUrl: function(coord, zoom) {
    var wrappedX = coord.x % (1 << zoom);
    return "/tiles/" + zoom + "/" + wrappedX + "/" + coord.y;
  },
  tileSize: ...
...
}

BTW - you may want to take a look at the ImageMapType. Seems like it does
pretty much what you're doing right now.

The above code is untested, but should work!

Chris

-- 
http://twitter.com/broady

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to