﻿var Ilat = 49.779254;
var Ilng = 18.447782;

function NaGPS() {	
}

function Initialize()
{
	if (GBrowserIsCompatible())
	{
		// define the crosshair tile layer and its required functions
		var crossLayer = new GTileLayer(new GCopyrightCollection(""), 0, 15);
		crossLayer.getTileUrl = function(tile, zoom) {
			return "./include/tile_crosshairs.png";
		}
		crossLayer.isPng = function() { return true; }
		var myHtml = "<div id=\"map_marker\">";
		myHtml += "<h3>ARENA BAR &amp; CLUB</h3>";
		myHtml += "<h4>GPS:</h4>";
		myHtml += "<div class=\"map_gps\">";
		myHtml += "<div class=\"map_gps_head\">Latitude (šířka):</div>";
		myHtml += "<div class=\"map_gps_val\">49°46\'45.314\"N (" + Ilat + ")</div>";
		myHtml += "<div class=\"map_gps_head\">Longitude (délka):</div>";
		myHtml += "<div class=\"map_gps_val\">18°26\'52.015\"W (" + Ilng + ")</div>";
		myHtml += "</div>";
		myHtml += "<a href=\"http://maps.google.cz/maps?hl=cs&q=arena+bar&lr=&ie=UTF8&hq=arena+bar&hnear=&ll=49.780377,18.447783&spn=0.007136,0.019205&t=h&z=16&iwloc=A&cid=13755948988669308415\" target=\"_blanc\" title=\"Zobrazí mapu Google v novém okně.\">více na mapě Google</a>";
		myHtml += "</div>";
		// Create a new map type incorporating the tile layer
		var layerTerCross = [G_PHYSICAL_MAP.getTileLayers()[0], crossLayer];
		var mtTerCross = new GMapType(layerTerCross, G_PHYSICAL_MAP.getProjection(), "Ter+");
		var map = new GMap2(document.getElementById("map_canvas"), { size: new GSize(336, 252) });
		map.addMapType(G_PHYSICAL_MAP);
		map.addMapType(mtTerCross);
		map.setCenter(new GLatLng(Ilat, Ilng), 14);
		map.addControl(new GSmallMapControl())
		map.openInfoWindowHtml(map.getCenter(), myHtml);
	}
}
