I have written a tile image generator for use with overlay.getTileUrl(tileCoord,zoom) that works as expected for map type Road_Map for zoom levels to 21
function tile2lng(x,z) { return (x/Math.pow(2,z)*360-180); }
function tile2lat(y,z) { var n=Math.PI-2*Math.PI*y/Math.pow(2,z);
return (180/Math.PI*Math.atan(0.5*(Math.exp(n)-Math.exp(-n)))); }
at lat/lng 37.21 / -77.26
When the Satellite map is zoomed to level 18 the tile coordinates for the requested overlay tile calculate to lat/lng 27.37 / -77.26
Actually, there seem to be two passes at loading the map. First tile lat/lng is requested correctly, then a Projection_Changed event occurs, and then tiles are re-requested with lat/lng calculated incorrectly. It seems the projection for Satellite tiles displayed at map zoom 18 to 21 is not the standard Google mercator projection. How should this change be detected by overlay.getTileURL(coord,zoom) ?
What is the proper way to calculate lat/lng for Satellite tiles when map zoomed 18 to 21 ?