Changeset 2891


Ignore:
Timestamp:
10/05/12 14:09:15 (5 years ago)
Author:
ahocevar
Message:

Handle the case where the map has no base layer yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/geoext.ux/ux/PrintPreview/lib/GeoExt.ux/PrintPreview.js

    r2890 r2891  
    153153        if(this.printMapPanel) {
    154154            if(!(this.printMapPanel instanceof GeoExt.PrintMapPanel)) {
    155                 printMapPanelOptions.xtype = "gx_printmappanel"
     155                printMapPanelOptions.xtype = "gx_printmappanel";
    156156                this.printMapPanel = new GeoExt.PrintMapPanel(
    157157                    Ext.applyIf(this.printMapPanel, printMapPanelOptions));
     
    326326        var map = this.printMapPanel.map;
    327327        var scaleLine = new OpenLayers.Control.ScaleLine({
    328             geodesic: !map.getProjectionObject().equals("EPSG:4326")
     328            geodesic: !(map.getProjectionObject() || new OpenLayers.Projection(map.projection || "EPSG:4326")).equals("EPSG:4326")
    329329        });
    330330        map.addControl(scaleLine);
Note: See TracChangeset for help on using the changeset viewer.