[OpenLayers-Commits] r2291 - sandbox/alilucio/openlayers/examples

commits at openlayers.org commits at openlayers.org
Thu Mar 1 11:21:21 EST 2007


Author: alilucio
Date: 2007-03-01 11:21:16 -0500 (Thu, 01 Mar 2007)
New Revision: 2291

Added:
   sandbox/alilucio/openlayers/examples/testimage.png
   sandbox/alilucio/openlayers/examples/testimagelayer.html
Log:
Added test for Layer.Image

Added: sandbox/alilucio/openlayers/examples/testimage.png
===================================================================
(Binary files differ)


Property changes on: sandbox/alilucio/openlayers/examples/testimage.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: sandbox/alilucio/openlayers/examples/testimagelayer.html
===================================================================
--- sandbox/alilucio/openlayers/examples/testimagelayer.html	                        (rev 0)
+++ sandbox/alilucio/openlayers/examples/testimagelayer.html	2007-03-01 16:21:16 UTC (rev 2291)
@@ -0,0 +1,27 @@
+<html>
+	<head>
+		<script type="text/javascript" src="../lib/OpenLayers.js"></script>
+		<script>
+			function init()
+			{
+				var map = new OpenLayers.Map('map');
+				ol_wmslayer = new OpenLayers.Layer.WMS( "Satellite",
+                    "http://labs.metacarta.com/wms-c/Basic.py?", {layers: 'satellite'} );
+				map.addLayers([ol_wmslayer]);
+				if (!map.getCenter())
+				    {
+				        // Zoom on the U.S.
+				        map.setCenter(new OpenLayers.LonLat(-77.035, 38.889), 8);
+    				}
+			    map.addControl(new OpenLayers.Control.MousePosition());
+			    var imageUrl = "testimage.png";
+                var bounds = new OpenLayers.Bounds(-77.86996, 39.82833, -76.31540, 41.09176);
+                var image = new OpenLayers.Layer.Image("Threat Envelope", imageUrl, bounds, new OpenLayers.Size(100, 100), {isBaseLayer: false, opacity: 0.7});
+			    map.addLayers([image]);
+			}
+		</script>
+	</head>
+	<body onload="init();">
+		<div id="map" style="width: 600; height: 400;"></div>
+	</body>
+</html>
\ No newline at end of file



More information about the Commits mailing list