You do not need to write a custom projection class,
GMercatorProjection will work just fine. It is not affected by tile
size.
What you do need to make sure is use the tile cutter program (some may
not support 128 tile size) correctly, make sure it matches the scale
level of google tiles (i.e. you should have the same number of pixels
at same zoom level).
When the maps API requests tile, it will use the tileSize specified in
the MapType constructor, and calculate the correct tile reference then
pass into getUrl (tile, z).

if you have your tile cut correctly, this is all you need:

var myCopyright = new GCopyrightCollection("(c) ");
        myCopyright.addCopyright(new GCopyright('Demo',
          new GLatLngBounds(new GLatLng(-90,-180), new GLatLng
(90,180)),
          0,''));
        var tilelayer = new GTileLayer(myCopyright, 12, 18);
        tilelayer.getTileUrl = function(tile, z) {
           return "http://..youserver../tile/"+z+"/"+tile.y
+"/"+tile.x;
         };
        tilelayer.isPng = function() { return true;};
        tilelayer.getOpacity = function() { return 1.0; }
        var myMapType = new GMapType
([tilelayer],G_NORMAL_MAP.getProjection(), "MyMap", {tileSize:128});
        var map = new GMap2(document.getElementById("map_canvas"),
{mapTypes:[myMapType]});
        map.setCenter(new GLatLng(35.23, -80.84), 15);


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