Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
85 lines (80 sloc) 2.04 KB
<!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>
<title>test map</title>
<style type="text/css">
html, body {
margin:0;
padding:0;
position:absolute;
top: 0; left: 0;
}
/*
canvas {
position: absolute;
left:0; top:0;
border: 0;
z-index: 20;
}
*/
div#map {
width:800px; height:500px;
margin:0;
padding:0;
border:0;
background-color: #999;
z-index: 10;
position: relative;
top: 20px; left: 20px;
}
div#test_poi {
position:absolute;
width:70px;
height:25px;
background-color: #fa5;
z-index:31;
}
</style>
</head>
<body onload="go();">
<div style="position:relative; top:20px; left:20px;">
<div id="map"></div>
<div id="debugOut" style="position:absolute; left:850px; top:0; width:400px;">test123</div>
</div>
<script type="text/javascript" src="excanvas.compiled.js"></script>
<script type="text/javascript" src="Mapiator.js"></script>
<script type="text/javascript">
var myMap;
function again(){
//myMap.setCenter(53.0, 10.0);
myMap.setCenter(48, 10);
myMap.redraw();
//myMap.moveByPx( -30, 0 );
}
function go() {
// myMap.initialize('myMap');
// alert('ferdich');
myMap = new Mapiator.Map('map');
myMap.setZoomLevel( 4 );
//myMap.setCenter(48.0, 10.0);
myMap.setCenter(48, 10);
// myMap.setCenter(48.48, -4.75);
var ls = Mapiator.parseWKT( "LINESTRING (9 50, 12 50, 11.5756 48.1371)" );
ls.strokeWidth = 10;
ls.strokeStyle = 'rgba(0, 100, 0, 0.5)';
myMap.addElement( ls );
var poly = Mapiator.parseWKT( "Polygon (7 50, 10 50, 9.5756 48.1371)" );
poly.fillStyle = 'rgba(0, 0, 100, 0.5)';
myMap.addElement( poly );
var test = document.createElement('div');
test.id = 'test_poi';
test.onclick = function(e){
alert('bitte dieses DIV nicht mehr klicken!');
};
myMap.overlayLayer.addElement(test, 48, 10);
window.debugPD = true;
myMap.redraw();
}
</script>
</body>
</html>