Thread:Extension talk:Maps/Adding custom maptype

I've been looking around the Maps documentation and code to see if the extension allows adding custom maptypes. My conclusion so far is that it doesn't look like it, but I'm not completely sure.

To be clear, what I need to do is to use the maps from the Norwegian Mapping Authority (Statens Kartverk) as a base layer alongside Google's own Terrain-layer. This is normally done by defining a custom maptype and simply add it to the map (code example below). Could anyone of you please tell me if this is possible with the current Maps-extension, or if I would have to make my own extension on top of Maps?

function StatkartMapType(name, layer) { this.layer = layer this.name = name this.alt = name this.tileSize = new google.maps.Size(256,256); this.maxZoom = 19; this.getTile = function(coord, zoom, ownerDocument) { var div = ownerDocument.createElement('DIV'); div.style.width = this.tileSize.width + 'px'; div.style.height = this.tileSize.height + 'px'; div.style.backgroundImage = "url(http://opencache.statkart.no/gatekeeper/gk/gk.open_gmaps?layers=" + this.layer + "&zoom=" + zoom + "&x=" + coord.x + "&y=" + coord.y + ")"; return div; }; }

var map; function initialize { var mapOptions = { zoom: 8, center: new google.maps.LatLng(60,9), mapTypeControlOptions: { mapTypeIds: ['topo2', google.maps.MapTypeId.TERRAIN] } };  map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); map.mapTypes.set('topo2',new StatkartMapType("S.Kartverk", "topo2")); map.setMapTypeId('topo2'); }