diff options
Diffstat (limited to 'tools/mmd')
-rw-r--r-- | tools/mmd/MmdUser.py | 2 | ||||
-rw-r--r-- | tools/mmd/mmd.css | 15 | ||||
-rw-r--r-- | tools/mmd/testmap.html | 75 |
3 files changed, 83 insertions, 9 deletions
diff --git a/tools/mmd/MmdUser.py b/tools/mmd/MmdUser.py index c954626..7ba1fa0 100644 --- a/tools/mmd/MmdUser.py +++ b/tools/mmd/MmdUser.py @@ -91,7 +91,7 @@ class User: if __name__ == "__main__": user = User () - email = 'the6@mur.at' + email = 'jfh@mur.at' try: assert user, 'no user object' code = user.create (1, 'jogi', 'hofmueller', email, '', 'blah') diff --git a/tools/mmd/mmd.css b/tools/mmd/mmd.css index d6d714e..0a149a0 100644 --- a/tools/mmd/mmd.css +++ b/tools/mmd/mmd.css @@ -21,7 +21,7 @@ html, body #rcol { - font: 12px courier, monospace; + font: 12pt courier, monospace; width: 640px; margin: 1px; padding: 2px; @@ -42,7 +42,7 @@ html, body #lcol { - font: 12px courier, monospace; + font: 12pt courier, monospace; width: 280px; height: auto; margin: 1px; @@ -54,23 +54,23 @@ html, body #info { - font: 12px courier, monospace; + font: 12pt courier, monospace; color: black; background-color: white; } #datahead { - font: 16px courier, monospace; + font: 16pt courier, monospace; } #status { - font: 24px arial, sans-serif; + font: 24pt arial, sans-serif; color: white; width: 100%; height: 64px; - margin 1px; + margin: 1px; padding: 2px; border: 0; float: left; @@ -85,8 +85,7 @@ html, body .formfield { - font: courier, monospace; - size: 14pt; + font: 14pt courier, monospace; float: none; } diff --git a/tools/mmd/testmap.html b/tools/mmd/testmap.html new file mode 100644 index 0000000..9f60f4d --- /dev/null +++ b/tools/mmd/testmap.html @@ -0,0 +1,75 @@ +<html> + <head> + <title> + Tests for OSM + </title> + <link rel="stylesheet" href="mmd.css" type="text/css" /> + </head> + <body> + <div id="osm"></div> + <script src="http://www.openlayers.org/api/OpenLayers.js"></script> + <script> + // satellite and user position + var from = new OpenLayers.Projection ("EPSG:4326"); + var to = new OpenLayers.Projection ("EPSG:900913"); + var sat_position = new OpenLayers.LonLat (45.7209722222, -22.5726666667).transform (from, to); + var user_location = new OpenLayers.LonLat (15.4422, 47.0657).transform (from, to); + // create a map + var map = new OpenLayers.Map ("osm"); + map.addLayer (new OpenLayers.Layer.OSM ()); + + // create a markers + var markersLayer = new OpenLayers.Layer.Markers ("Markers"); + var sat = new OpenLayers.Marker (sat_position); + var user = new OpenLayers.Marker (user_location); + user.setOpacity (0.5); + map.addLayer (markersLayer); + markersLayer.addMarker (sat); + markersLayer.addMarker (user); + + // points/polygons + var lineLayer = new OpenLayers.Layer.Vector ("Polygons"); + map.addLayer (lineLayer); + map.addControl (new OpenLayers.Control.DrawFeature(lineLayer, OpenLayers.Handler.Path)); + + // create a fake trjaectory + var trajectory = new Array ( + new OpenLayers.LonLat (44.7, -21.5).transform (from, to), + new OpenLayers.LonLat (42.7, -19.5).transform (from, to), + new OpenLayers.LonLat (40.7, -17.5).transform (from, to), + new OpenLayers.LonLat (38.7, -15.5).transform (from, to), + new OpenLayers.LonLat (36.7, -13.5).transform (from, to), + new OpenLayers.LonLat (34.7, -11.5).transform (from, to), + new OpenLayers.LonLat (32.7, -9.5).transform (from, to), + new OpenLayers.LonLat (30.7, -7.5).transform (from, to), + new OpenLayers.LonLat (28.7, -5.5).transform (from, to), + new OpenLayers.LonLat (26.7, -3.5).transform (from, to), + new OpenLayers.LonLat (24.7, -1.5).transform (from, to), + new OpenLayers.LonLat (22.7, 1.5).transform (from, to), + new OpenLayers.LonLat (20.7, 3.5).transform (from, to), + new OpenLayers.LonLat (18.7, 5.5).transform (from, to), + new OpenLayers.LonLat (16.7, 7.5).transform (from, to), + new OpenLayers.LonLat (14.7, 9.5).transform (from, to), + new OpenLayers.LonLat (12.7, 11.5).transform (from, to), + new OpenLayers.LonLat (10.7, 13.5).transform (from, to), + new OpenLayers.LonLat (8.7, 15.5).transform (from, to), + new OpenLayers.LonLat (6.7, 17.5).transform (from, to), + new OpenLayers.LonLat (4.7, 19.5).transform (from, to), + new OpenLayers.LonLat (2.7, 21.5).transform (from, to), + new OpenLayers.LonLat (0.7, 23.5).transform (from, to) + ); + var points = new Array (new OpenLayers.Geometry.Point (sat_position.lon, sat_position.lat)); + for (var i = 0; i < trajectory.length; i++) + { + points.push (new OpenLayers.Geometry.Point (trajectory[i].lon, trajectory[i].lat)); + } + var polygon = new OpenLayers.Geometry.LineString (points); + var lineStyle = {strokeColor: '#00ff00', strokeOpacity: 1, strokeWidth: 2}; + var lineFeature = new OpenLayers.Feature.Vector (polygon, null, lineStyle); + lineLayer.addFeatures ([lineFeature]); + + // center the map + map.setCenter (sat_position, 2); + </script> + </body> +</html> |