Talk:Die HTML Dateien

From OpenStreetMap Wiki
Jump to: navigation, search

XHTML Code Highlight

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de-de">
<head>
<title>Map | Testanwendung</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="content-script-type" content="text/javascript" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-language" content="de" />
<meta name="author" content="Thomas Heiles" />
<link rel="stylesheet" type="text/css" href="css/map.css">
<script type="text/javascript" src="http://www.openlayers.org/api/OpenLayers.js"></script>
<script type="text/javascript" src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js"></script>
<script type="text/javascript" src="js/tom.js"></script>
 
<script type="text/javascript">
//<![CDATA[

var map;
var layer_mapnik;
var layer_tah;
var layer_markers;

function drawmap() {

var popuptext="<font color=\"black\"><b>Thomas Heiles<br />Straße 123<br />
 54290 Trier</b><p><img src=\"test.jpg\" width=\"180\" height=\"120\"></p></font>";

    OpenLayers.Lang.setCode('de');
    
    // Position
    var lon = 6.641389;
    var lat = 49.756667;
    var zoom = 15;

    map = new OpenLayers.Map('map', {
        projection: new OpenLayers.Projection("EPSG:900913"),
        displayProjection: new OpenLayers.Projection("EPSG:4326"),
        controls: [
            new OpenLayers.Control.MouseDefaults(),
            new OpenLayers.Control.LayerSwitcher(),
            new OpenLayers.Control.PanZoomBar()],
        maxExtent:
            new OpenLayers.Bounds(-20037508.34,-20037508.34,
                                   20037508.34, 20037508.34),
        numZoomLevels: 18,
        maxResolution: 156543,
        units: 'meters'
    });

    layer_mapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik");
    layer_markers = new OpenLayers.Layer.Markers("Address", { projection: new OpenLayers.Projection("EPSG:4326"), 
    	                                          visibility: true, displayInLayerSwitcher: false });

    map.addLayers([layer_mapnik, layer_markers]);
    jumpTo(lon, lat, zoom);

    addMarker(layer_markers, 6.641389, 49.756667, popuptext);

}

//]]>
    </script>
  </head>
  <body onload=drawmap();>

  <div id="header">
  <div id="content">Karte (Testversion)</div>
  <div id="osm">Mit freundlicher Unterstützung von <a href="http://www.openstreetmap.org" 
title="www.openstreetmap.org">openstreetmap.org</a></div>
  </div>
  
  <div id="map">
 </div>
 
</body>
</html>