Changeset 1199

Show
Ignore:
Timestamp:
07/01/09 22:59:51 (4 years ago)
Author:
tschaub
Message:

Persist custom title in bookmark.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • apps/opengeo/geoexplorer/trunk/build/license.js

    r621 r1199  
    11/* 
    2 Copyright (c) 2008-2009, The Open Planning Project 
     2Copyright (c) 2008-2009, OpenGeo 
    33All rights reserved. 
    44 
  • apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js

    r1198 r1199  
    14321432     */  
    14331433    extractConfiguration: function() { 
     1434 
     1435        var center = this.map.getCenter();         
    14341436        var config = { 
    1435             ows: {} 
     1437            ows: {}, 
     1438            map: { 
     1439                center: [center.lon, center.lat], 
     1440                zoom: this.map.zoom, 
     1441                layers: [] 
     1442            } 
    14361443        }; 
    1437  
    1438         // Map configuration 
    1439  
    1440         var center = this.map.getCenter(); 
    1441          
    1442         config.map = { 
    1443             center: [center.lon, center.lat], 
    1444             zoom: this.map.zoom 
    1445         }; 
    1446  
    1447         var sourcesUsed = {}; 
    1448  
    1449         //Layers configuration 
    1450         config.map.layers = []; 
    14511444         
    14521445        this.layers.each(function(layerRecord){ 
     
    14641457                    return; 
    14651458                } 
    1466  
    1467                 sourcesUsed[source.get("identifier")] = source.get("url"); 
     1459                // add source 
     1460                config.ows[source.get("identifier")] = source.get("url"); 
    14681461                 
    1469                 var c =
     1462                config.map.layers.push(
    14701463                    name: layerRecord.get("name"), 
     1464                    title: layerRecord.get("title"), 
    14711465                    visibility: layer.getVisibility(), 
    14721466                    background: layerRecord.get('background'), 
    14731467                    ows: source.get("identifier") 
    1474                 }; 
    1475  
    1476                 config.map.layers.push(c); 
     1468                }); 
    14771469            } 
    14781470        }, this); 
    1479          
    1480         // Source configuration 
    1481         for (identifier in sourcesUsed) { 
    1482             config.ows[identifier] = sourcesUsed[identifier]; 
    1483         } 
    14841471         
    14851472        return config;