[GIS] how to replace GTileLayer in google maps API v3

google mapsgoogle-maps-apitile-map-servicetiles

I need to port code of one application written in Google Mapa API v.2 to API v.3. There is several layers taken via TMS, that are displayed using GTileLayer class. It is as simple as:

var tilelayer_tematyczne = new GTileLayer(null, null, null, {
    tileUrlTemplate: 'http://domain/geoserver/gwc/service/gmaps?layers=layer&zoom={Z}&x={X}&y={Y}&format=image/png',
    isPng:true,
    opacity:1 
});

tilesTematyczne = new GTileLayerOverlay(tilelayer_tematyczne);
map.addOverlay(tilesTematyczne);

I do not see any similar class in API v3. How do you cope with that problem? How to display TMS on top of Google Maps?

Best Answer

A brief google search has lead me to this page which says:

...in the API V3, with the MapType object, you write your own .getTile() method: http://code.google.com/apis/maps/documentation/v3/reference.html#MapType

Sample: http://maps.forum.nu/v3/gm_customTiles.html

Further Research has lead me to this feature request on Google Code. According to the attached Change Log,there is a New ImageMapType object to support custom map tiles

http://code.google.com/apis/maps/documentation/v3/reference.html#ImageMapType