[Commits] r1600 - sandbox/ahocevar/playground/ux/Printing/examples

commits at geoext.org commits at geoext.org
Mon Dec 21 13:24:23 CET 2009


Author: ahocevar
Date: 2009-12-21 13:24:22 +0100 (Mon, 21 Dec 2009)
New Revision: 1600

Modified:
   sandbox/ahocevar/playground/ux/Printing/examples/Printing.html
   sandbox/ahocevar/playground/ux/Printing/examples/Printing.js
Log:
reverted example changes that were accidently committed.

Modified: sandbox/ahocevar/playground/ux/Printing/examples/Printing.html
===================================================================
--- sandbox/ahocevar/playground/ux/Printing/examples/Printing.html	2009-12-20 21:20:51 UTC (rev 1599)
+++ sandbox/ahocevar/playground/ux/Printing/examples/Printing.html	2009-12-21 12:24:22 UTC (rev 1600)
@@ -18,8 +18,8 @@
         make them available in the printCapabilities variable.
         The script tag below can be removed when configuring the printProvider
         with url instead of capabilities
+        -->
         <script type="text/javascript" src="http://demo.mapfish.org/mapfishsample/1.2/print/info.json?var=printCapabilities"></script>
-        -->
         
     </head>
     <body>

Modified: sandbox/ahocevar/playground/ux/Printing/examples/Printing.js
===================================================================
--- sandbox/ahocevar/playground/ux/Printing/examples/Printing.js	2009-12-20 21:20:51 UTC (rev 1599)
+++ sandbox/ahocevar/playground/ux/Printing/examples/Printing.js	2009-12-21 12:24:22 UTC (rev 1600)
@@ -5,20 +5,20 @@
     printProvider = new GeoExt.ux.data.PrintProvider({
         // using get for remote service access without same origin restriction.
         // For asynchronous requests, we would set method to "POST".
-        //method: "GET",
-        method: "POST",
+        method: "GET",
+        //method: "POST",
         
         // capabilities from script tag in Printing.html. For asynchonous
         // loading, we would configure url instead of capabilities.
-        //capabilities: printCapabilities
-        url: "/geoserver/pdf/"
+        capabilities: printCapabilities
+        //url: "/geoserver/pdf/"
     });
     
     var mapPanel = new GeoExt.MapPanel({
         region: "center",
         layers: [new OpenLayers.Layer.WMS("Global Imagery",
-            "/geoserver/wms",
-            {layers: "nurc:Arc_Sample"})] ,
+            "http://labs.metacarta.com/wms/vmap0",
+            {layers: "basic"})] ,
         center: [16,48],
         zoom: 5
     });
@@ -42,18 +42,10 @@
     ]);
     mapPanel.map.addLayer(redline);
     
-    var legend = new GeoExt.LegendPanel({
-        region: "west",
-        width: 200,
-        defaults: {style: "padding:5px"},
-        layerStore: mapPanel.layers
-    });
-
     // a simple print form
     printForm = new GeoExt.ux.form.SimplePrint({
         map: mapPanel,
         printProvider: printProvider,
-        printOptions: {legend: legend},
         bodyStyle: {padding: "5px"},
         labelWidth: 65,
         defaults: {width: 115},
@@ -93,19 +85,18 @@
         layout: "border",
         width: 800,
         height: 350,
-        items: [legend, mapPanel, formCt]
+        items: [mapPanel, formCt]
     });
     
     /* add the print form to its container and make sure that the print page
      * fits the max extent
+     */
     formCt.add(printForm);
     formCt.doLayout();
     printForm.pages[0].fitPage(mapPanel.map);
-     */
 
     /* use this code block instead of the above one if you configured the
      * printProvider with url instead of capabilities
-     */
     var myMask = new Ext.LoadMask(formCt.body, {msg:"Loading data..."});
     myMask.show();
     printProvider.on("loadcapabilities", function() {
@@ -114,5 +105,6 @@
         formCt.doLayout();
         printForm.pages[0].fitPage(mapPanel.map);
     });
+     */
     
 });



More information about the Commits mailing list