lageplan_2D_projection = new GMercatorProjection(18); //Creates a mercator projection for the given number of zoom levels

copyrights = new GCopyrightCollection('©');
var lageplan_copy = new GCopyright(
	'lageplan_copy',
	new GLatLngBounds(
		new GLatLng(-90,-180),
		new GLatLng(90,180)),
	0,
	'<a href="http://www.tu-cottbus.de/">BTU Cottbus</a>'
);
copyrights.addCopyright(lageplan_copy);

// #################################

// Kachelschicht für 2D Plan - Standard
var tiles_lageplan_2D = new GTileLayer(
		copyrights,
		1, 			// minResolution
		17 				// maxResolution
	);
tiles_lageplan_2D.getTileUrl = function(tile,zoom){
	var x = tile.x;
	var y = tile.y;
	
	if ( (zoom == 15 && 
			( 
				(x >= 17684 && x <= 17685 && y >= 10856 && y <= 10857) || 
				(x >= 17687 && x <= 17688 && y >= 10857 && y <= 10858) 
			) 
		 ) ||
		 (zoom == 16 && 
			(
				(x >= 35369 && x <= 35370 && y >= 21712 && y <= 21714) ||
				(x >= 35374 && x <= 35377 && y >= 21715 && y <= 21717)
			)
		 ) ||	
		 (zoom == 17 && 
			(
				(x >= 70738 && x <= 70741 && y >= 43425 && y <= 43428) ||
				(x >= 70748 && x <= 70754 && y >= 43430 && y <= 43434)
			)
		 ) ||
		 (zoom == 18 && 
			(
				(x >= 141476 && x <= 141483 && y >= 86850 && y <= 86857) ||
				(x >= 141497 && x <= 141508 && y >= 86860 && y <= 86869)
			)
		 )
		)
	{	
		return basisurl + ordnerAPI + '/tiles/2D_tiles/'	+ zoom + '_' + x + '_' + y + '.gif';	
	}
	else
	{
		return basisurl + ordnerAPI + '/tiles/trans.gif';
	}
};
tiles_lageplan_2D.isPng = function() { return false; }
tiles_lageplan_2D.getOpacity = function() { return 1.0; }

// #################################
// ENDE KACHELSCHICHTEN
// #################################

// 2D Karte - Standard
var lageplan_2D = new GMapType(
	[G_NORMAL_MAP.getTileLayers()[0], tiles_lageplan_2D], 	// <-- Array of Tile Layers
	//[G_SATELLITE_MAP.getTileLayers()[0], G_NORMAL_MAP.getTileLayers()[0], tiles_lageplan_2D], 	// <-- Array of Tile Layers
	//[tiles_lageplan_2D], 	 
	lageplan_2D_projection,	
	'Karte',
	{
		shortName:'2D-Karte',
		tileSize:256,
		maxResolution:17,
		minResolution:1
	}
);
