Keine Bearbeitungszusammenfassung |
(→Test) |
||
Zeile 151: | Zeile 151: | ||
==Test== | ==Test== | ||
===1=== | |||
<nowiki> | <nowiki> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
Zeile 156: | Zeile 157: | ||
<head> | <head> | ||
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> | <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> | ||
<title>Tamriel-Almanach - Interaktive Nirnkarte</title> | |||
<link rel="author" title="Impressum" href="http://www.scharesoft.de/joomla/almanach/index.php/Tamriel-Almanach:Impressum" /> | |||
<link rel="top" title="Startseite" href="http://www.scharesoft.de/joomla/almanach/index.php/Hauptseite" /> | |||
<link rel="shortcut icon" href="http://www.scharesoft.de/joomla/almanach/index.php/favicon.ico" /> | |||
<link rel="stylesheet" type="text/css" href="map.css" /> | |||
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAgPiOGdZvwyyVmc2RZrG3JBS-Vs_dbl0vhd_ymT5RsBDgC2O1exS8IvZpztApH-WS_5i5QgB4nNLpNQ" type="text/javascript"></script> | |||
<script src="map-common.js" type="text/javascript"></script> | |||
</head> | |||
<body> | |||
<div id="navbar"> | |||
<div id="logo"> | |||
<a title="Hauptseite anzeigen" href="http://www.scharesoft.de/joomla/almanach/index.php/Hauptseite" style="background-image: url(http://www.scharesoft.de/joomla/almanach/skins/common/images/almanach.png);"></a> | |||
</div> | |||
<div class="navcat"> | |||
<h5>Navigation</h5> | |||
<div class="navcat_list"> | |||
<ul> | |||
<li><a href="http://www.scharesoft.de/joomla/almanach/index.php/Hauptseite" title="Hauptseite anzeigen">Hauptseite</a></li> | |||
<li><a href="http://www.scharesoft.de/joomla/almanach/index.php/Spezial:Letzte_%C3%84nderungen" title="Liste der letzten Änderungen in Tamriel-Almanach">Letzte Änderungen</a></li> | |||
<li><a href="http://www.scharesoft.de/joomla/almanach/index.php/Tamriel-Almanach:Community-Portal">Community-Portal</a></li> | |||
<li><a href="http://www.scharesoft.de/joomla/almanach/nirn/">Interaktive Karte</a></li> | |||
<li><a href="http://www.scharesoft.de/joomla/almanach/index.php/Spezial:Alle_Seiten">Alle Seiten</a></li> | |||
<li><a href="http://www.scharesoft.de/joomla/almanach/index.php/Spezial:Zuf%C3%A4llige_Seite" title="Zufällige Seite">Zufällige Seite</a></li> | |||
<li><a href="http://www.scharesoft.de/joomla/almanach/index.php/Hauptseite/Hilfe" title="Hilfeseite anzeigen">Hilfe</a></li> | |||
<li><a href="http://www.scharesoft.de/joomla/forum/forumdisplay.php?f=34">Forum</a></li> | |||
</ul> | |||
</div> | |||
</div> | |||
<div class="navcat"> | |||
<h5>Links</h5> | |||
<div class="navcat_list"> | |||
<ul> | |||
<li><a href="http://www.scharesoft.de/">Scharesoft-Portal</a></li> | |||
<li><a href="http://www.scharesoft.de/joomla/almanach/index.php/Tamriel-Almanach:Impressum">Impressum</a></li> | |||
</ul> | |||
</div> | |||
</div> | |||
</div> | |||
<div id="content"> | |||
<h1 class="title">Interaktive Nirn-Karte</h1> | |||
<div id="map_area"> | |||
<div id="ta_nirnmap"></div> | |||
</div> | |||
<script type="text/javascript"> | |||
//<![CDATA[ | |||
var OorImage = "http://www.scharesoft.de/joomla/almanach/nirn/water.jpg"; | |||
if (GBrowserIsCompatible()) { | |||
// ===== The Mercator map, exactly like that in the "custommaptile" example ===== | |||
var tilelayers = [new GTileLayer(new GCopyrightCollection("Tamriel: scharesoft.de"), 8, 15)]; | |||
tilelayers[0].getCopyright = function(a,b) { | |||
return {prefix:"Tamriel: ", copyrightTexts:["scharesoft.de"]}; | |||
} | |||
tilelayers[0].getTileUrl = CustomGetTileUrl; | |||
var custommap = new GMapType(tilelayers, G_NORMAL_MAP.getProjection(), "Mercator", {errorMessage: ""}); | |||
// ===== Create a Map Type that uses the Euclidean projection ===== | |||
var tilelayers2 = [new GTileLayer(new GCopyrightCollection("Tamriel: scharesoft.de"), 8, 15)]; | |||
tilelayers2[0].getCopyright = function(a, b) { | |||
return {prefix: "Tamriel:", copyrightTexts: ["scharesoft.de"]}; | |||
}; | |||
tilelayers2[0].getTileUrl = CustomGetTileUrl; | |||
var custommap2 = new GMapType(tilelayers2, new EuclideanProjection(17), "Euclidean", {errorMessage: ""}); | |||
// == Open a map with these two custom map types == | |||
var map = new GMap2(document.getElementById("ta_nirnmap"), {mapTypes: [custommap2]}); | |||
map.addControl(new GLargeMapControl()); | |||
map.addControl(new GMapTypeControl()); | |||
map.setCenter(new GLatLng(89.05, -177.90), 9, custommap2); | |||
map.enableContinuousZoom(); | |||
map.enableScrollWheelZoom(); | |||
GEvent.addListener(map, 'click', | |||
function(overlay, point){ | |||
if (point){ | |||
document.getElementById('latitude').value = point.y; | |||
document.getElementById('longitude').value = point.x; | |||
} | |||
} | |||
); | |||
// Cyrodiil | |||
addMarker(89.03058528900146, -177.85929679870605, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Kaiserstadt</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Stadt<br />Herzlande - Cyrodiil<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Kaiserstadt" target="_blank">Kaiserstadt</a></p></div>', 3); | |||
addMarker(88.8588809967041, -177.56657123565674, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Welke</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Ayleid-Ruine<br />Dunkelforst - Cyrodiil<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Welke" target="_blank">Welke</a></p></div>', 4); | |||
addMarker(89.07755613327026, -178.15549850463867, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Festung Schlachthorn</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Festung<br />Colovianisches Hochland - Cyrodiil<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Festung_Schlachthorn" target="_blank">Festung Schlachthorn</a></p></div>', 5); | |||
addMarker(88.98468732833862, -178.39234828948975, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Varus-Lager</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Lager<br />Colovianisches Hochland - Cyrodiil<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Varus-Lager" target="_blank">Varus-Lager</a></p></div>', 1); | |||
// Vvardenfell | |||
addMarker(89.17263507843018, -177.4189853668213, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Darvame Hleran</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Schlickschreiter-Führerin<br />Seyda Neen - Vvardenfell<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Schlickschreiter-F%C3%A4hrdienst" target="_blank">Schlickschreiter-Fährdienst</a> - <a href="http://www.scharesoft.de/joomla/almanach/index.php/Darvame_Hleran" target="_blank">Darvame Hleran</a></p></div>', 14); | |||
addMarker(89.29837703704834, -177.54631519317627, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Arkngthunch-Sturdumz</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Dwemer-Ruine<br />Westspalte - Vvardenfell<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Arkngthunch-Sturdumz" target="_blank">Arkngthunch-Sturdumz</a></p></div>', 12); | |||
addMarker(89.24657821655273, -177.21745491027832, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Elf-Skerring</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Schiff<br />Sadrith Mora - Vvardenfell<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Elf-Skerring" target="_blank">Elf-Skerring</a> - <a href="http://www.scharesoft.de/joomla/almanach/index.php/Gals_Arethi" target="_blank">Gals Arethi</a></p></div>', 13); | |||
// Morrowind | |||
addMarker(89.04041290283203, -177.13488578796387, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Gramfeste</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Stadt<br />Morrowind<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Gramfeste" target="_blank">Gramfeste</a></p></div>', 3); | |||
// Stros M'Kai | |||
addMarker(88.96539688110352, -178.85119915008545, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Stros M'Kai</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Stadt<br />Stros M'Kai - Hammerfell<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Stros_M%27Kai_(Stadt)" target="_blank">Stros M'Kai</a></p></div>', 3); | |||
// Hochfels | |||
addMarker(89.19233322143555, -178.7010383605957, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Wegesruh</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Stadt<br />Hochfels - Illiac Bucht<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Wegesruh_(Stadt)" target="_blank">Wegesruh</a></p></div>', 3); | |||
// Schwarzmarsch | |||
addMarker(88.7640380859375, -177.55897521972656, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Gideon</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Stadt<br />Schwarzmarsch - Kaiserliches Schutzgebiet<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Gideon" target="_blank">Gideon</a></p></div>', 3); | |||
// Summerset-Inseln | |||
addMarker(88.73571395874023, -179.0277099609375, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Alinor</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Stadt<br />Summerset-Inseln <br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Alinor" target="_blank">Alinor</a></p></div>', 3); | |||
// Himmelsrand | |||
addMarker(89.35317993164062, -177.9572296142578, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Dämmerstern</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Stadt<br />Himmelsrand<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/D%C3%A4mmerstern" target="_blank">Dämmerstern</a></p></div>', 3); | |||
// Elsweyr | |||
addMarker(88.72352600097656, -178.0011749267578, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Torval</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Stadt<br />Elsweyr<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Torval_(Stadt)" target="_blank">Torval</a></p></div>', 3); | |||
// Add a move listener to restrict the bounds range | |||
GEvent.addListener(map, "move", function() { | |||
checkBounds(); | |||
}); | |||
// The allowed region which the whole map must be within | |||
var allowedBounds = new GLatLngBounds(new GLatLng(87.89, -179.9999), new GLatLng(89.9999, -176.50)); | |||
// ======== Add a map overview ========== | |||
map.addControl(new GOverviewMapControl(new GSize(200, 160))); | |||
// ======== Cause the overview to be positioned AFTER IE sets its initial position ======== | |||
setTimeout("positionOverview(800,0)", 1); | |||
taUpdateMapFromInput() | |||
//map.setCenter(new GLatLng(89.5, -177.2), 12, custommap2); | |||
// display a warning if the browser was not compatible | |||
} else { | |||
alert("Es tut uns Leid, aber Google Maps API ist mit Ihrem Browser nicht kompatibel."); | |||
} | |||
//]]> | |||
</script> | |||
</div> | |||
</body> | |||
</html> | |||
</nowiki> | |||
===2=== | |||
<nowiki> | |||
body { | |||
-x-system-font: none; | |||
background: #F9F9F9 url(http://www.scharesoft.de/joomla/almanach/skins/monobook/headbg.jpg) no-repeat scroll 0 0; | |||
color: black; | |||
font-family: "Arial", sans-serif; | |||
font-size: x-small; | |||
font-size-adjust: none; | |||
font-stretch: normal; | |||
font-style: normal; | |||
font-variant: normal; | |||
font-weight: normal; | |||
line-height: normal; | |||
margin: 0px; | |||
padding: 0px; | |||
} | } | ||
#navbar { | #navbar { | ||
position: absolute; | |||
top: 0px; | |||
left: 0px; | |||
padding: 0px; | |||
margin: 0px; | |||
width: 12.2em; | |||
border: none; | |||
font-size: 127%; | |||
} | } | ||
# | #logo { | ||
height: 155px; | |||
width: 100%; | |||
text-align: center; | |||
border: none; | |||
margin: 0px; | |||
padding: 0px; | |||
} | } | ||
# | #logo a { | ||
background-position: 35% 50%; | |||
background-repeat: no-repeat; | |||
display: block; | |||
height: 155px; | |||
text-decoration: none; | |||
width: 12.2em; | |||
} | } | ||
div.navcat { | div.navcat { | ||
border: medium none; | |||
float: none; | |||
margin: 5px 0 0.5em 0; | |||
overflow: hidden; | |||
padding: 0; | |||
width: 11.6em; | |||
} | } | ||
div.navcat_list { | div.navcat_list { | ||
background-color: white; | |||
border: 1px solid silver; | |||
border-collapse: collapse; | |||
color: black; | |||
font-size: 95%; | |||
padding: 0 0.8em 0.3em 0.5em; | |||
-moz-border-radius-bottomright: 1em; | |||
-moz-border-radius-topright: 1em; | |||
} | } | ||
#content { | |||
position: absolute; | |||
left: 12.2em; | |||
right: 0px; | |||
top: 0px; | |||
bottom: 0px; | |||
margin: 2.8em 0 0.6em 0; | |||
-moz-border-radius-bottomleft: 1em; | |||
-moz-border-radius-topleft: 1em; | |||
border-color: silver; | |||
border-width: 1px 0px 1px 1px; | |||
border-style: solid none solid solid; | |||
font-size: 127%; | |||
padding: 0 1em 1em; | |||
background: white none repeat scroll 0 0; | |||
line-height: 1.5em; | |||
} | } | ||
. | |||
h1.title { | |||
background: transparent none repeat scroll 0 0; | |||
border-bottom: 1px solid #AAAAAA; | |||
color: black; | |||
margin: 0; | |||
padding-top: 0.5em; | |||
font-size: 188%; | |||
line-height: 1.2em; | |||
margin-bottom: 0.1em; | |||
padding-bottom: 0; | |||
font-weight: normal; | |||
} | } | ||
h5 { | h5 { | ||
margin: 0; | |||
padding-bottom: 0.17em; | |||
padding-top: 0.5em; | |||
border-bottom: medium none; | |||
display: inline; | |||
font-size: 91%; | |||
height: 1em; | |||
padding: 0 1em 0 0.5em; | |||
white-space: nowrap; | |||
width | -moz-border-radius-topright: 1em; | ||
background-color: #D1D4E0; | |||
border: thin solid silver; | |||
font-weight: bold; | |||
margin-top: 10px; | |||
} | |||
ul { | |||
border-collapse: collapse; | |||
margin: 0.3em 0 0 1.5em; | |||
padding: 0; | |||
font-size: 95%; | |||
line-height: 1.5em; | |||
list-style-image: url(bullet.gif); | |||
list-style-type: square; | |||
} | |||
li { | |||
font-size: 95%; | |||
line-height: 1.5em; | |||
margin: 0px; | |||
margin-bottom: 0.1em; | |||
padding: 0px; | |||
list-style-image: url(http://www.scharesoft.de/joomla/almanach/skins/monobook/Bullet1.gif); | |||
} | |||
li:hover { | |||
list-style-image: url(http://www.scharesoft.de/joomla/almanach/skins/monobook/Bullet2.gif); | |||
} | |||
li a { | |||
text-decoration: none; | |||
} | |||
li a:hover { | |||
text-decoration: underline; | |||
} | |||
#map_area { | |||
position: absolute; | |||
left: 10px; | |||
right: 10px; | |||
top: 50px; | |||
bottom: 10px; | |||
text-align: center; | |||
text-align: center; | |||
z-index: 3; | |||
} | |||
#ta_nirnmap { | |||
position: relative; | |||
left: 0px; | |||
right: 0px; | |||
top: 0px; | |||
bottom: 0px; | |||
height: 100%; | |||
width: 100%; | |||
min-height: 500px; | |||
} | |||
</nowiki> | |||
===3=== | |||
<nowiki> | |||
//Set initial parameters and default values | |||
// Map properties and constants | |||
var taMapDefaultCenter = new GLatLng(89.05, -177.90); | |||
var taMapBounds = new GLatLngBounds(new GLatLng(87.89, -179.9999), new GLatLng(89.9999, -176.50)); | |||
var taMapDefaultZoom = 10; | |||
var taMinMapZoom = 8; | |||
var taMaxMapZoom = 15; | |||
var taBaseMapZoom = 15; // this is the zoom level at which one tile = one game cell | |||
var taOBLCellSize = 4096.0; | |||
var taMWCellSize = 8192.0; | |||
// Main map objects | |||
var ta_nirnmap; | |||
var umCustomMapType; | |||
var umMapTileLayer; | |||
// A function to create the marker and set up the event window | |||
// Dont try to unroll this function. It has to be here for the function closure | |||
// Each instance of the function preserves the contends of a different instance | |||
// of the "marker" and "html" variables which will be needed later when the event triggers. | |||
function createMarker(point,html,type) { | |||
var marker = null; | |||
if (!type) { | |||
marker = new GMarker(point); | |||
} else { | |||
var icon = new GIcon(); | |||
icon.image = taGetMapMarkerIcon(type); | |||
icon.shadow = ""; | |||
icon.iconSize = new GSize(16,16); | |||
icon.shadowSize = new GSize(0,0); | |||
icon.iconAnchor = new GPoint(8,8); | |||
icon.infoWindowAnchor = new GPoint(8,8); | |||
var options = { icon: icon }; | |||
marker = new GMarker(point, options); | |||
} | |||
GEvent.addListener(marker, "click", function() { | |||
marker.openInfoWindowHtml(html); | |||
}); | |||
return marker; | |||
} | |||
function addMarker(x, y, html, type) { | |||
var point = new GLatLng(x, y); | |||
var marker = createMarker(point, html, type); | |||
map.addOverlay(marker); | |||
} | |||
function CustomGetTileUrl(a,z) { | |||
if (z >= 8 && z <= 15) { | |||
var MinX = 0; | |||
var MinY = 0; | |||
var MaxX = Math.floor(384 / Math.pow(2, 15 - z)); | |||
var MaxY = Math.floor(384 / Math.pow(2, 15 - z)); | |||
if (a.x <= MaxX && a.y <= MaxY && a.x >= MinX && a.y >= MinY) { | |||
return "http://www.scharesoft.de/joomla/almanach/nirn/zoom" + z + "/tamriel_" + (a.x) + "_" + (MaxY - a.y - 1) + "_" + z + ".jpg"; | |||
} | |||
} | |||
return OorImage; | |||
}; | |||
// Get map marker icon image file | |||
function taGetMapMarkerIcon(MarkerType) { | |||
var Icon = "Other" | |||
switch (MarkerType) { | |||
case 0: Icon = "None"; break; | |||
case 1: Icon = "lager"; break; | |||
case 2: Icon = "graeber"; break; | |||
case 3: Icon = "stadt"; break; | |||
case 4: Icon = "ayleid"; break; | |||
case 5: Icon = "festung"; break; | |||
case 6: Icon = "#Mine"; break; | |||
case 7: Icon = "landmarke"; break; | |||
case 9: Icon = "#Town"; break; | |||
case 10: Icon = "#Daedric"; break; | |||
case 11: Icon = "#Oblivion"; break; | |||
case 12: Icon = "dwemer"; break; | |||
case 13: Icon = "schiff"; break; | |||
case 14: Icon = "schlickschreiter"; break; | |||
case 30: Icon = "#Nirnroot"; break; | |||
case 40: Icon = "#Door"; break; | |||
case 41: Icon = "#House"; break; | |||
case 42: Icon = "#Shop"; break; | |||
case 44: Icon = "#Tavern"; break; | |||
case 100: | |||
default: Icon = "Other"; | |||
} | |||
return 'http://www.scharesoft.de/joomla/almanach/nirn/' + "icons/icon_"+Icon+".gif"; | |||
} | |||
// If the map position is out of range, move it back | |||
function checkBounds() { | |||
// Perform the check and return if OK | |||
if (allowedBounds.contains(map.getCenter())) { | |||
return; | |||
} | |||
// It`s not OK, so find the nearest allowed point and move there | |||
var C = map.getCenter(); | |||
var X = C.lng(); | |||
var Y = C.lat(); | |||
var AmaxX = allowedBounds.getNorthEast().lng(); | |||
var AmaxY = allowedBounds.getNorthEast().lat(); | |||
var AminX = allowedBounds.getSouthWest().lng(); | |||
var AminY = allowedBounds.getSouthWest().lat(); | |||
if (X > 0.0) {X = AminX;} //Avoid wrapping | |||
if (Y < 0.0) {Y = AmaxY;} | |||
if (X < AminX) {X = AminX;} | |||
if (X > AmaxX) {X = AmaxX;} | |||
if (Y < AminY) {Y = AminY;} | |||
if (Y > AmaxY) {Y = AmaxY;} | |||
map.setCenter(new GLatLng(Y, X)); | |||
} | |||
// ======== A function to adjust the positioning of the overview ======== | |||
function positionOverview(x, y) { | |||
var omap=document.getElementById("map_overview"); | |||
omap.style.left = x + "px"; | |||
omap.style.top = y + "px"; | |||
// == restyling == | |||
omap.firstChild.style.border = "1px solid gray"; | |||
omap.firstChild.firstChild.style.left = "1px"; | |||
omap.firstChild.firstChild.style.top = "1px"; | |||
omap.firstChild.firstChild.style.width = "190px"; | |||
omap.firstChild.firstChild.style.height = "150px"; | |||
} | |||
// ====== Create the Euclidean Projection for the flat map ====== | |||
// == Constructor == | |||
function EuclideanProjection(a) { | |||
this.pixelsPerLonDegree = []; | |||
this.pixelsPerLonRadian = []; | |||
this.pixelOrigo = []; | |||
this.tileBounds = []; | |||
var b = 256; | |||
var c = 1; | |||
for(var d = 0; d < a; d++) { | |||
var e = b / 2; | |||
this.pixelsPerLonDegree.push(b / 360); | |||
this.pixelsPerLonRadian.push(b / (2 * Math.PI)); | |||
this.pixelOrigo.push(new GPoint(e, e)); | |||
this.tileBounds.push(c); | |||
b *= 2; | |||
c *= 2 | |||
} | |||
} | } | ||
// == Attach it to the GProjection() class == | |||
EuclideanProjection.prototype = new GProjection(); | |||
// == A method for converting latitudes and longitudes to pixel coordinates == | |||
EuclideanProjection.prototype.fromLatLngToPixel = function(a, b) { | |||
var c = Math.round(this.pixelOrigo[b].x + a.lng() * this.pixelsPerLonDegree[b]); | |||
var d = Math.round(this.pixelOrigo[b].y + (-2 * a.lat()) * this.pixelsPerLonDegree[b]); | |||
return new GPoint(c, d); | |||
}; | |||
// == a method for converting pixel coordinates to latitudes and longitudes == | |||
EuclideanProjection.prototype.fromPixelToLatLng=function(a, b, c) { | |||
var d = (a.x - this.pixelOrigo[b].x) / this.pixelsPerLonDegree[b]; | |||
var e = -0.5 * (a.y - this.pixelOrigo[b].y) / this.pixelsPerLonDegree[b]; | |||
return new GLatLng(e, d, c); | |||
}; | |||
// == a method that checks if the y value is in range, and wraps the x value == | |||
EuclideanProjection.prototype.tileCheckRange = function(a, b, c) { | |||
var d = this.tileBounds[b]; | |||
if (a.y < 0 || a.y >= d) { | |||
return false; | |||
} | |||
if(a.x < 0 || a.x >= d) { | |||
a.x = a.x % d; | |||
if(a.x < 0) { | |||
a.x += d; | |||
} | |||
} | |||
return true; | |||
} | |||
// == a method that returns the width of the tilespace == | |||
EuclideanProjection.prototype.getWrapWidth = function(zoom) { | |||
return this.tileBounds[zoom] * 256; | |||
} | |||
// Set the map to a specific Oblivion location at the current zoom level | |||
function taShowLocation(X, Y) { | |||
var Point = taConvertOBLLocToLatLng(X, Y); | |||
taMapState.MoveTo(ta_nirnmap, Point); | |||
} | |||
// Set the map to a specific Morrowind location at the current zoom level | |||
function taShowLocation(X, Y) { | |||
var Point = taConvertMWLocToLatLng(X, Y); | |||
taMapState.MoveTo(ta_nirnmap, Point); | |||
} | |||
// Convert an Oblivion location to a map latitude/longitude | |||
function taConvertOBLLocToLatLng(X, Y) { | |||
var Lng = ((((X/4096 + 64) * 241.0/256.0) + 128.0)/32768.0 * 360.0) - 180.0; | |||
var Lat = 90.0 - ((385 - 128 - ((70 + Y/4096) * 241/256))/32768.0 * 180.0); | |||
return new GLatLng(Lat, Lng); | |||
} | |||
// Convert an Morrowind location to a map latitude/longitude | |||
function taConvertMWLocToLatLng(X, Y) { | |||
var Lng = -180.0 + ((X/8192 + 236)/32768 * 360.0); | |||
var Lat = 90.0 - ((385 - 243 - Y/8192)/32768 * 180.0); | |||
return new GLatLng(Lat, Lng); | |||
} | |||
// Updates the map parameters from any input parameters | |||
function taUpdateMapFromInput() { | |||
var Lat = taGetURLParam("lat"); | |||
var Lng = taGetURLParam("lng"); | |||
var Zoom = taGetURLParam("zoom") | |||
var OBLLocX = taGetURLParam("obllocx"); | |||
var OBLLocY = taGetURLParam("obllocy"); | |||
var MWLocX = taGetURLParam("mwlocx"); | |||
var MWLocY = taGetURLParam("mwlocy"); | |||
var CellX = taGetURLParam("cellx"); | |||
var CellY = taGetURLParam("celly"); | |||
if (MWLocX && MWLocY != "") { | |||
taMapState.ZoomTo(map, taConvertMWLocToLatLng(parseFloat(MWLocX), parseFloat(MWLocY)), Zoom); | |||
} | |||
else if (OBlLocX && OBLLocY != "") { | |||
taMapState.ZoomTo(ta_nirnmap, taConvertOBLLocToLatLng(parseFloat(OBLLocX), parseFloat(OBLLocY)), Zoom); | |||
} | |||
} | |||
// Sets the map center/zoom | |||
taMapState.ZoomTo = function(Map, Center, Zoom) { | |||
Map.setCenter(Center, Zoom, custommap2); | |||
this.Center = Center; | |||
this.Zoom = Zoom; | |||
this.MapBounds = Map.getBounds(); | |||
}; | |||
// Sets the map center keeping the current zoom | |||
taMapState.MoveTo = function(Map, Center) { | |||
Map.setCenter(Center); | |||
this.Center = Center; | |||
this.MapBounds = Map.getBounds(); | |||
}; | |||
// Retrieve a specific input parameter | |||
function taGetURLParam(strParamName) { | |||
var strReturn = ""; | |||
var strHref = window.location.href; | |||
if ( strHref.indexOf("?") > -1 ){ | |||
var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase(); | |||
var aQueryString = strQueryString.split("&"); | |||
for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){ | |||
if ( aQueryString[iParam].indexOf(strParamName + "=") > -1 ){ | |||
var aParam = aQueryString[iParam].split("="); | |||
strReturn = aParam[1]; | |||
break; | |||
} | |||
} | |||
} | |||
return strReturn; | |||
} | |||
</nowiki> | </nowiki> |
Version vom 7. April 2009, 11:41 Uhr
Erklärung
Das ist Killfetzers Spielplatz, so dass er nicht ständig neue Testseiten erstellen muss ;) --Deepfighter 12:43, 27. Sep. 2007 (CEST)
Ich hab mal ein wenig Ordnung gemacht und die Artikel auf Unterseiten verteilt. --Killfetzer 11:07, 7. Dez. 2008 (CET)
- Spielplatz/1 - Achtzigjähriger Krieg
- Spielplatz/2 - ini-Hack für Morrowind
- Spielplatz/3 - Schlacht am Roten Berg
Notizen
(Dwemer)
- Guylaine's Architecture of the Second Empire
- Nchunak's Fire and Faith
- Ruinen von Kemel-Ze
- Nchuleftingth Excavation Report 11 / Senellius' Report
- Chroniken von Nchuleft
- Sandas-Ahnengruft
- No-h's Picture Book of Wood
Aussprache
- Cyrodiil - Kürodil (Begrüßung Gramfeste, Imperial für Imperial)
- Pelagiad - Pe-là-giad (Begrüßung von Dunmer in Pelagiad)
- Khuul - Khu-ul (Begrüßung Dunmer in Khuul)
- Elswyr - Elsweir (Begrüßung Gramfeste, Imperial für Khajiit)
- Dwemer - Dwemer (Martin Septim, Vholendrung als Daedraertefakt abgegeben)
Attributtabelle
Attributtabelle 2
Daggerfall | Morrowind | Oblivion | ||||||
m | w | m | w | m | w | |||
Stärke | 10 | 20 | 30 | 40 | 50 | 60 | ||
Intelligenz | 10 | 20 | 30 | 40 | 50 | 60 |
Test
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> <title>Tamriel-Almanach - Interaktive Nirnkarte</title> <link rel="author" title="Impressum" href="http://www.scharesoft.de/joomla/almanach/index.php/Tamriel-Almanach:Impressum" /> <link rel="top" title="Startseite" href="http://www.scharesoft.de/joomla/almanach/index.php/Hauptseite" /> <link rel="shortcut icon" href="http://www.scharesoft.de/joomla/almanach/index.php/favicon.ico" /> <link rel="stylesheet" type="text/css" href="map.css" /> <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAgPiOGdZvwyyVmc2RZrG3JBS-Vs_dbl0vhd_ymT5RsBDgC2O1exS8IvZpztApH-WS_5i5QgB4nNLpNQ" type="text/javascript"></script> <script src="map-common.js" type="text/javascript"></script> </head> <body> <div id="navbar"> <div id="logo"> <a title="Hauptseite anzeigen" href="http://www.scharesoft.de/joomla/almanach/index.php/Hauptseite" style="background-image: url(http://www.scharesoft.de/joomla/almanach/skins/common/images/almanach.png);"></a> </div> <div class="navcat"> <h5>Navigation</h5> <div class="navcat_list"> <ul> <li><a href="http://www.scharesoft.de/joomla/almanach/index.php/Hauptseite" title="Hauptseite anzeigen">Hauptseite</a></li> <li><a href="http://www.scharesoft.de/joomla/almanach/index.php/Spezial:Letzte_%C3%84nderungen" title="Liste der letzten Änderungen in Tamriel-Almanach">Letzte Änderungen</a></li> <li><a href="http://www.scharesoft.de/joomla/almanach/index.php/Tamriel-Almanach:Community-Portal">Community-Portal</a></li> <li><a href="http://www.scharesoft.de/joomla/almanach/nirn/">Interaktive Karte</a></li> <li><a href="http://www.scharesoft.de/joomla/almanach/index.php/Spezial:Alle_Seiten">Alle Seiten</a></li> <li><a href="http://www.scharesoft.de/joomla/almanach/index.php/Spezial:Zuf%C3%A4llige_Seite" title="Zufällige Seite">Zufällige Seite</a></li> <li><a href="http://www.scharesoft.de/joomla/almanach/index.php/Hauptseite/Hilfe" title="Hilfeseite anzeigen">Hilfe</a></li> <li><a href="http://www.scharesoft.de/joomla/forum/forumdisplay.php?f=34">Forum</a></li> </ul> </div> </div> <div class="navcat"> <h5>Links</h5> <div class="navcat_list"> <ul> <li><a href="http://www.scharesoft.de/">Scharesoft-Portal</a></li> <li><a href="http://www.scharesoft.de/joomla/almanach/index.php/Tamriel-Almanach:Impressum">Impressum</a></li> </ul> </div> </div> </div> <div id="content"> <h1 class="title">Interaktive Nirn-Karte</h1> <div id="map_area"> <div id="ta_nirnmap"></div> </div> <script type="text/javascript"> //<![CDATA[ var OorImage = "http://www.scharesoft.de/joomla/almanach/nirn/water.jpg"; if (GBrowserIsCompatible()) { // ===== The Mercator map, exactly like that in the "custommaptile" example ===== var tilelayers = [new GTileLayer(new GCopyrightCollection("Tamriel: scharesoft.de"), 8, 15)]; tilelayers[0].getCopyright = function(a,b) { return {prefix:"Tamriel: ", copyrightTexts:["scharesoft.de"]}; } tilelayers[0].getTileUrl = CustomGetTileUrl; var custommap = new GMapType(tilelayers, G_NORMAL_MAP.getProjection(), "Mercator", {errorMessage: ""}); // ===== Create a Map Type that uses the Euclidean projection ===== var tilelayers2 = [new GTileLayer(new GCopyrightCollection("Tamriel: scharesoft.de"), 8, 15)]; tilelayers2[0].getCopyright = function(a, b) { return {prefix: "Tamriel:", copyrightTexts: ["scharesoft.de"]}; }; tilelayers2[0].getTileUrl = CustomGetTileUrl; var custommap2 = new GMapType(tilelayers2, new EuclideanProjection(17), "Euclidean", {errorMessage: ""}); // == Open a map with these two custom map types == var map = new GMap2(document.getElementById("ta_nirnmap"), {mapTypes: [custommap2]}); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(89.05, -177.90), 9, custommap2); map.enableContinuousZoom(); map.enableScrollWheelZoom(); GEvent.addListener(map, 'click', function(overlay, point){ if (point){ document.getElementById('latitude').value = point.y; document.getElementById('longitude').value = point.x; } } ); // Cyrodiil addMarker(89.03058528900146, -177.85929679870605, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Kaiserstadt</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Stadt<br />Herzlande - Cyrodiil<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Kaiserstadt" target="_blank">Kaiserstadt</a></p></div>', 3); addMarker(88.8588809967041, -177.56657123565674, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Welke</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Ayleid-Ruine<br />Dunkelforst - Cyrodiil<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Welke" target="_blank">Welke</a></p></div>', 4); addMarker(89.07755613327026, -178.15549850463867, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Festung Schlachthorn</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Festung<br />Colovianisches Hochland - Cyrodiil<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Festung_Schlachthorn" target="_blank">Festung Schlachthorn</a></p></div>', 5); addMarker(88.98468732833862, -178.39234828948975, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Varus-Lager</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Lager<br />Colovianisches Hochland - Cyrodiil<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Varus-Lager" target="_blank">Varus-Lager</a></p></div>', 1); // Vvardenfell addMarker(89.17263507843018, -177.4189853668213, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Darvame Hleran</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Schlickschreiter-Führerin<br />Seyda Neen - Vvardenfell<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Schlickschreiter-F%C3%A4hrdienst" target="_blank">Schlickschreiter-Fährdienst</a> - <a href="http://www.scharesoft.de/joomla/almanach/index.php/Darvame_Hleran" target="_blank">Darvame Hleran</a></p></div>', 14); addMarker(89.29837703704834, -177.54631519317627, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Arkngthunch-Sturdumz</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Dwemer-Ruine<br />Westspalte - Vvardenfell<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Arkngthunch-Sturdumz" target="_blank">Arkngthunch-Sturdumz</a></p></div>', 12); addMarker(89.24657821655273, -177.21745491027832, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Elf-Skerring</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Schiff<br />Sadrith Mora - Vvardenfell<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Elf-Skerring" target="_blank">Elf-Skerring</a> - <a href="http://www.scharesoft.de/joomla/almanach/index.php/Gals_Arethi" target="_blank">Gals Arethi</a></p></div>', 13); // Morrowind addMarker(89.04041290283203, -177.13488578796387, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Gramfeste</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Stadt<br />Morrowind<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Gramfeste" target="_blank">Gramfeste</a></p></div>', 3); // Stros M'Kai addMarker(88.96539688110352, -178.85119915008545, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Stros M'Kai</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Stadt<br />Stros M'Kai - Hammerfell<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Stros_M%27Kai_(Stadt)" target="_blank">Stros M'Kai</a></p></div>', 3); // Hochfels addMarker(89.19233322143555, -178.7010383605957, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Wegesruh</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Stadt<br />Hochfels - Illiac Bucht<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Wegesruh_(Stadt)" target="_blank">Wegesruh</a></p></div>', 3); // Schwarzmarsch addMarker(88.7640380859375, -177.55897521972656, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Gideon</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Stadt<br />Schwarzmarsch - Kaiserliches Schutzgebiet<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Gideon" target="_blank">Gideon</a></p></div>', 3); // Summerset-Inseln addMarker(88.73571395874023, -179.0277099609375, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Alinor</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Stadt<br />Summerset-Inseln <br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Alinor" target="_blank">Alinor</a></p></div>', 3); // Himmelsrand addMarker(89.35317993164062, -177.9572296142578, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Dämmerstern</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Stadt<br />Himmelsrand<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/D%C3%A4mmerstern" target="_blank">Dämmerstern</a></p></div>', 3); // Elsweyr addMarker(88.72352600097656, -178.0011749267578, '<div style="text-align:left; align:left;"><p style="font-family:Arial, sans-serif; font-size:12pt; margin-bottom:3px; font-weight:bold; padding-bottom:0px;">Torval</p><p style="font-family:Arial, sans-serif; font-size:9pt; display:block; margin-left:10px;">Stadt<br />Elsweyr<br /><a href="http://www.scharesoft.de/joomla/almanach/index.php/Torval_(Stadt)" target="_blank">Torval</a></p></div>', 3); // Add a move listener to restrict the bounds range GEvent.addListener(map, "move", function() { checkBounds(); }); // The allowed region which the whole map must be within var allowedBounds = new GLatLngBounds(new GLatLng(87.89, -179.9999), new GLatLng(89.9999, -176.50)); // ======== Add a map overview ========== map.addControl(new GOverviewMapControl(new GSize(200, 160))); // ======== Cause the overview to be positioned AFTER IE sets its initial position ======== setTimeout("positionOverview(800,0)", 1); taUpdateMapFromInput() //map.setCenter(new GLatLng(89.5, -177.2), 12, custommap2); // display a warning if the browser was not compatible } else { alert("Es tut uns Leid, aber Google Maps API ist mit Ihrem Browser nicht kompatibel."); } //]]> </script> </div> </body> </html>
2
body { -x-system-font: none; background: #F9F9F9 url(http://www.scharesoft.de/joomla/almanach/skins/monobook/headbg.jpg) no-repeat scroll 0 0; color: black; font-family: "Arial", sans-serif; font-size: x-small; font-size-adjust: none; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal; margin: 0px; padding: 0px; } #navbar { position: absolute; top: 0px; left: 0px; padding: 0px; margin: 0px; width: 12.2em; border: none; font-size: 127%; } #logo { height: 155px; width: 100%; text-align: center; border: none; margin: 0px; padding: 0px; } #logo a { background-position: 35% 50%; background-repeat: no-repeat; display: block; height: 155px; text-decoration: none; width: 12.2em; } div.navcat { border: medium none; float: none; margin: 5px 0 0.5em 0; overflow: hidden; padding: 0; width: 11.6em; } div.navcat_list { background-color: white; border: 1px solid silver; border-collapse: collapse; color: black; font-size: 95%; padding: 0 0.8em 0.3em 0.5em; -moz-border-radius-bottomright: 1em; -moz-border-radius-topright: 1em; } #content { position: absolute; left: 12.2em; right: 0px; top: 0px; bottom: 0px; margin: 2.8em 0 0.6em 0; -moz-border-radius-bottomleft: 1em; -moz-border-radius-topleft: 1em; border-color: silver; border-width: 1px 0px 1px 1px; border-style: solid none solid solid; font-size: 127%; padding: 0 1em 1em; background: white none repeat scroll 0 0; line-height: 1.5em; } h1.title { background: transparent none repeat scroll 0 0; border-bottom: 1px solid #AAAAAA; color: black; margin: 0; padding-top: 0.5em; font-size: 188%; line-height: 1.2em; margin-bottom: 0.1em; padding-bottom: 0; font-weight: normal; } h5 { margin: 0; padding-bottom: 0.17em; padding-top: 0.5em; border-bottom: medium none; display: inline; font-size: 91%; height: 1em; padding: 0 1em 0 0.5em; white-space: nowrap; -moz-border-radius-topright: 1em; background-color: #D1D4E0; border: thin solid silver; font-weight: bold; margin-top: 10px; } ul { border-collapse: collapse; margin: 0.3em 0 0 1.5em; padding: 0; font-size: 95%; line-height: 1.5em; list-style-image: url(bullet.gif); list-style-type: square; } li { font-size: 95%; line-height: 1.5em; margin: 0px; margin-bottom: 0.1em; padding: 0px; list-style-image: url(http://www.scharesoft.de/joomla/almanach/skins/monobook/Bullet1.gif); } li:hover { list-style-image: url(http://www.scharesoft.de/joomla/almanach/skins/monobook/Bullet2.gif); } li a { text-decoration: none; } li a:hover { text-decoration: underline; } #map_area { position: absolute; left: 10px; right: 10px; top: 50px; bottom: 10px; text-align: center; text-align: center; z-index: 3; } #ta_nirnmap { position: relative; left: 0px; right: 0px; top: 0px; bottom: 0px; height: 100%; width: 100%; min-height: 500px; }
3
//Set initial parameters and default values // Map properties and constants var taMapDefaultCenter = new GLatLng(89.05, -177.90); var taMapBounds = new GLatLngBounds(new GLatLng(87.89, -179.9999), new GLatLng(89.9999, -176.50)); var taMapDefaultZoom = 10; var taMinMapZoom = 8; var taMaxMapZoom = 15; var taBaseMapZoom = 15; // this is the zoom level at which one tile = one game cell var taOBLCellSize = 4096.0; var taMWCellSize = 8192.0; // Main map objects var ta_nirnmap; var umCustomMapType; var umMapTileLayer; // A function to create the marker and set up the event window // Dont try to unroll this function. It has to be here for the function closure // Each instance of the function preserves the contends of a different instance // of the "marker" and "html" variables which will be needed later when the event triggers. function createMarker(point,html,type) { var marker = null; if (!type) { marker = new GMarker(point); } else { var icon = new GIcon(); icon.image = taGetMapMarkerIcon(type); icon.shadow = ""; icon.iconSize = new GSize(16,16); icon.shadowSize = new GSize(0,0); icon.iconAnchor = new GPoint(8,8); icon.infoWindowAnchor = new GPoint(8,8); var options = { icon: icon }; marker = new GMarker(point, options); } GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; } function addMarker(x, y, html, type) { var point = new GLatLng(x, y); var marker = createMarker(point, html, type); map.addOverlay(marker); } function CustomGetTileUrl(a,z) { if (z >= 8 && z <= 15) { var MinX = 0; var MinY = 0; var MaxX = Math.floor(384 / Math.pow(2, 15 - z)); var MaxY = Math.floor(384 / Math.pow(2, 15 - z)); if (a.x <= MaxX && a.y <= MaxY && a.x >= MinX && a.y >= MinY) { return "http://www.scharesoft.de/joomla/almanach/nirn/zoom" + z + "/tamriel_" + (a.x) + "_" + (MaxY - a.y - 1) + "_" + z + ".jpg"; } } return OorImage; }; // Get map marker icon image file function taGetMapMarkerIcon(MarkerType) { var Icon = "Other" switch (MarkerType) { case 0: Icon = "None"; break; case 1: Icon = "lager"; break; case 2: Icon = "graeber"; break; case 3: Icon = "stadt"; break; case 4: Icon = "ayleid"; break; case 5: Icon = "festung"; break; case 6: Icon = "#Mine"; break; case 7: Icon = "landmarke"; break; case 9: Icon = "#Town"; break; case 10: Icon = "#Daedric"; break; case 11: Icon = "#Oblivion"; break; case 12: Icon = "dwemer"; break; case 13: Icon = "schiff"; break; case 14: Icon = "schlickschreiter"; break; case 30: Icon = "#Nirnroot"; break; case 40: Icon = "#Door"; break; case 41: Icon = "#House"; break; case 42: Icon = "#Shop"; break; case 44: Icon = "#Tavern"; break; case 100: default: Icon = "Other"; } return 'http://www.scharesoft.de/joomla/almanach/nirn/' + "icons/icon_"+Icon+".gif"; } // If the map position is out of range, move it back function checkBounds() { // Perform the check and return if OK if (allowedBounds.contains(map.getCenter())) { return; } // It`s not OK, so find the nearest allowed point and move there var C = map.getCenter(); var X = C.lng(); var Y = C.lat(); var AmaxX = allowedBounds.getNorthEast().lng(); var AmaxY = allowedBounds.getNorthEast().lat(); var AminX = allowedBounds.getSouthWest().lng(); var AminY = allowedBounds.getSouthWest().lat(); if (X > 0.0) {X = AminX;} //Avoid wrapping if (Y < 0.0) {Y = AmaxY;} if (X < AminX) {X = AminX;} if (X > AmaxX) {X = AmaxX;} if (Y < AminY) {Y = AminY;} if (Y > AmaxY) {Y = AmaxY;} map.setCenter(new GLatLng(Y, X)); } // ======== A function to adjust the positioning of the overview ======== function positionOverview(x, y) { var omap=document.getElementById("map_overview"); omap.style.left = x + "px"; omap.style.top = y + "px"; // == restyling == omap.firstChild.style.border = "1px solid gray"; omap.firstChild.firstChild.style.left = "1px"; omap.firstChild.firstChild.style.top = "1px"; omap.firstChild.firstChild.style.width = "190px"; omap.firstChild.firstChild.style.height = "150px"; } // ====== Create the Euclidean Projection for the flat map ====== // == Constructor == function EuclideanProjection(a) { this.pixelsPerLonDegree = []; this.pixelsPerLonRadian = []; this.pixelOrigo = []; this.tileBounds = []; var b = 256; var c = 1; for(var d = 0; d < a; d++) { var e = b / 2; this.pixelsPerLonDegree.push(b / 360); this.pixelsPerLonRadian.push(b / (2 * Math.PI)); this.pixelOrigo.push(new GPoint(e, e)); this.tileBounds.push(c); b *= 2; c *= 2 } } // == Attach it to the GProjection() class == EuclideanProjection.prototype = new GProjection(); // == A method for converting latitudes and longitudes to pixel coordinates == EuclideanProjection.prototype.fromLatLngToPixel = function(a, b) { var c = Math.round(this.pixelOrigo[b].x + a.lng() * this.pixelsPerLonDegree[b]); var d = Math.round(this.pixelOrigo[b].y + (-2 * a.lat()) * this.pixelsPerLonDegree[b]); return new GPoint(c, d); }; // == a method for converting pixel coordinates to latitudes and longitudes == EuclideanProjection.prototype.fromPixelToLatLng=function(a, b, c) { var d = (a.x - this.pixelOrigo[b].x) / this.pixelsPerLonDegree[b]; var e = -0.5 * (a.y - this.pixelOrigo[b].y) / this.pixelsPerLonDegree[b]; return new GLatLng(e, d, c); }; // == a method that checks if the y value is in range, and wraps the x value == EuclideanProjection.prototype.tileCheckRange = function(a, b, c) { var d = this.tileBounds[b]; if (a.y < 0 || a.y >= d) { return false; } if(a.x < 0 || a.x >= d) { a.x = a.x % d; if(a.x < 0) { a.x += d; } } return true; } // == a method that returns the width of the tilespace == EuclideanProjection.prototype.getWrapWidth = function(zoom) { return this.tileBounds[zoom] * 256; } // Set the map to a specific Oblivion location at the current zoom level function taShowLocation(X, Y) { var Point = taConvertOBLLocToLatLng(X, Y); taMapState.MoveTo(ta_nirnmap, Point); } // Set the map to a specific Morrowind location at the current zoom level function taShowLocation(X, Y) { var Point = taConvertMWLocToLatLng(X, Y); taMapState.MoveTo(ta_nirnmap, Point); } // Convert an Oblivion location to a map latitude/longitude function taConvertOBLLocToLatLng(X, Y) { var Lng = ((((X/4096 + 64) * 241.0/256.0) + 128.0)/32768.0 * 360.0) - 180.0; var Lat = 90.0 - ((385 - 128 - ((70 + Y/4096) * 241/256))/32768.0 * 180.0); return new GLatLng(Lat, Lng); } // Convert an Morrowind location to a map latitude/longitude function taConvertMWLocToLatLng(X, Y) { var Lng = -180.0 + ((X/8192 + 236)/32768 * 360.0); var Lat = 90.0 - ((385 - 243 - Y/8192)/32768 * 180.0); return new GLatLng(Lat, Lng); } // Updates the map parameters from any input parameters function taUpdateMapFromInput() { var Lat = taGetURLParam("lat"); var Lng = taGetURLParam("lng"); var Zoom = taGetURLParam("zoom") var OBLLocX = taGetURLParam("obllocx"); var OBLLocY = taGetURLParam("obllocy"); var MWLocX = taGetURLParam("mwlocx"); var MWLocY = taGetURLParam("mwlocy"); var CellX = taGetURLParam("cellx"); var CellY = taGetURLParam("celly"); if (MWLocX && MWLocY != "") { taMapState.ZoomTo(map, taConvertMWLocToLatLng(parseFloat(MWLocX), parseFloat(MWLocY)), Zoom); } else if (OBlLocX && OBLLocY != "") { taMapState.ZoomTo(ta_nirnmap, taConvertOBLLocToLatLng(parseFloat(OBLLocX), parseFloat(OBLLocY)), Zoom); } } // Sets the map center/zoom taMapState.ZoomTo = function(Map, Center, Zoom) { Map.setCenter(Center, Zoom, custommap2); this.Center = Center; this.Zoom = Zoom; this.MapBounds = Map.getBounds(); }; // Sets the map center keeping the current zoom taMapState.MoveTo = function(Map, Center) { Map.setCenter(Center); this.Center = Center; this.MapBounds = Map.getBounds(); }; // Retrieve a specific input parameter function taGetURLParam(strParamName) { var strReturn = ""; var strHref = window.location.href; if ( strHref.indexOf("?") > -1 ){ var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase(); var aQueryString = strQueryString.split("&"); for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){ if ( aQueryString[iParam].indexOf(strParamName + "=") > -1 ){ var aParam = aQueryString[iParam].split("="); strReturn = aParam[1]; break; } } } return strReturn; }