[Commits] r2891 - extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux

commits at geoext.org commits at geoext.org
Fri Oct 5 14:09:15 CEST 2012


Author: ahocevar
Date: 2012-10-05 14:09:15 +0200 (Fri, 05 Oct 2012)
New Revision: 2891

Modified:
   extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js
Log:
Handle the case where the map has no base layer yet.


Modified: extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js
===================================================================
--- extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js	2012-10-05 11:39:33 UTC (rev 2890)
+++ extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js	2012-10-05 12:09:15 UTC (rev 2891)
@@ -152,7 +152,7 @@
         };
         if(this.printMapPanel) {
             if(!(this.printMapPanel instanceof GeoExt.PrintMapPanel)) {
-                printMapPanelOptions.xtype = "gx_printmappanel"
+                printMapPanelOptions.xtype = "gx_printmappanel";
                 this.printMapPanel = new GeoExt.PrintMapPanel(
                     Ext.applyIf(this.printMapPanel, printMapPanelOptions));
             }
@@ -325,7 +325,7 @@
     createMapOverlay: function() {
         var map = this.printMapPanel.map;
         var scaleLine = new OpenLayers.Control.ScaleLine({
-            geodesic: !map.getProjectionObject().equals("EPSG:4326")
+            geodesic: !(map.getProjectionObject() || new OpenLayers.Projection(map.projection || "EPSG:4326")).equals("EPSG:4326")
         });
         map.addControl(scaleLine);
         scaleLine.activate();



More information about the Commits mailing list