[Commits] r2516 - extensions/geoext.ux/ux/SimplePrint/examples

commits at geoext.org commits at geoext.org
Wed Dec 8 15:57:29 CET 2010


Author: ahocevar
Date: 2010-12-08 15:57:29 +0100 (Wed, 08 Dec 2010)
New Revision: 2516

Modified:
   extensions/geoext.ux/ux/SimplePrint/examples/SimplePrint.js
Log:
updated example to use an Ext version compatible with GeoExt 1.0. Also changed the layer order, which is required after upgrading to GeoExt 1.0


Modified: extensions/geoext.ux/ux/SimplePrint/examples/SimplePrint.js
===================================================================
--- extensions/geoext.ux/ux/SimplePrint/examples/SimplePrint.js	2010-12-07 20:16:37 UTC (rev 2515)
+++ extensions/geoext.ux/ux/SimplePrint/examples/SimplePrint.js	2010-12-08 14:57:29 UTC (rev 2516)
@@ -16,15 +16,6 @@
         //autoLoad: true
     });
     
-    var mapPanel = new GeoExt.MapPanel({
-        region: "center",
-        layers: [new OpenLayers.Layer.WMS("Global Imagery",
-            "http://vmap0.tiles.osgeo.org/wms/vmap0",
-            {layers: "basic"})],
-        center: [16,48],
-        zoom: 5
-    });
-
     // create a vector layer, which will also be printed.
     var redline = new OpenLayers.Layer.Vector("vector", {
         styleMap: new OpenLayers.StyleMap({
@@ -36,13 +27,21 @@
             externalGraphic: "http://openlayers.org/dev/img/marker-blue.png"
         })
     });
+    var mapPanel = new GeoExt.MapPanel({
+        region: "center",
+        layers: [new OpenLayers.Layer.WMS("Global Imagery",
+            "http://vmap0.tiles.osgeo.org/wms/vmap0",
+            {layers: "basic"}), redline],
+        center: [16,48],
+        zoom: 5
+    });
+
     var geom = OpenLayers.Geometry.fromWKT, Vec = OpenLayers.Feature.Vector;
     redline.addFeatures([
         new Vec(geom("POLYGON(15 47, 15 46, 16 47, 16 48)")),
         new Vec(geom("LINESTRING(14 48, 14 47, 15 48, 14 49, 16 49)")),
         new Vec(geom("POINT(16 49)"))
     ]);
-    mapPanel.map.addLayer(redline);
     
     // Create a vector layer for the print page extent and handles.
     // We only do this because we want fancy styles for the handles,



More information about the Commits mailing list