MediaWiki:Wikia.css

<!DOCTYPE html> Image map types html, body, #map-canvas { height: 100%; margin: 0px; padding: 0px }    var titanTypeOptions = { getTileUrl: function(coord, zoom) { var y = coord.y;		var x = coord.x;		var url = 'images' + '/' + zoom + '/' + coord.x + '/' + //(bound - normalizedCoord.y - 1) + '.jpg'; (coord.y) + '.jpg'; var tilecount = Math.pow(2,zoom+1); maxCoord = (tilecount / 2) - 1; minCoord = (tilecount / -2); if (!validCoord(x,minCoord,maxCoord) || !validCoord(y,minCoord,maxCoord)) {			url = 'images/water.jpg'; }		return url; }, tileSize: new google.maps.Size(200, 200), maxZoom: 4, minZoom: 1, radius: 1738000, name: 'Titan' };

var titanMapType = new google.maps.ImageMapType(titanTypeOptions);

function initialize { var myLatlng = new google.maps.LatLng(0, 0); var mapOptions = { center: myLatlng, zoom: 0, streetViewControl: false, mapTypeControlOptions: { mapTypeIds: ['titan'] } };

var map = new google.maps.Map(document.getElementById('map-canvas'),     mapOptions); map.mapTypes.set('titan', titanMapType); map.setMapTypeId('titan'); }

function getConvertedCoord(coord, zoom) {	var y = coord.y;B var x = coord.x;	var url = 'images' + '/' + zoom + '/' + coord.x + '/' + //(bound - normalizedCoord.y - 1) + '.jpg'; (coord.y) + '.jpg'; var tilecount = 2*(zoom+1); maxCoord = (tilecount / 2) - 1; minCoord = (tilecount / -2); if (!validCoord(x,minCoord,maxCoord) || !validCoord(y,minCoord,maxCoord)) {		url = 'images/water.jpg'; } }

function validCoord(coord, minCoord, maxCoord) {	var valid = false; if (coord <= maxCoord && coord >= minCoord) {		valid = true; }	return valid }

// Normalizes the coords that tiles repeat across the x axis (horizontally) // like the standard Google map tiles. function getNormalizedCoord(coord, zoom) { var y = coord.y; var x = coord.x;

// tile range in one direction range is dependent on zoom level // 0 = 1 tile, 1 = 2 tiles, 2 = 4 tiles, 3 = 8 tiles, etc var tileRange = 20 * (zoom + 1);

// don't repeat across y-axis (vertically) if (y < 0 || y >= tileRange) { y = (y % tileRange + tileRange) % tileRange; return null; }

// repeat across x-axis if (x < 0 || x >= tileRange) { //x = (x % tileRange + tileRange) % tileRange; return null; }

return { x: x,   y: y  }; }

google.maps.event.addDomListener(window, 'load', initialize);