Changeset 1199
- Timestamp:
- 07/01/09 22:59:51 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
apps/opengeo/geoexplorer/trunk/build/license.js
r621 r1199 1 1 /* 2 Copyright (c) 2008-2009, The Open Planning Project2 Copyright (c) 2008-2009, OpenGeo 3 3 All rights reserved. 4 4 apps/opengeo/geoexplorer/trunk/src/script/app/GeoExplorer.js
r1198 r1199 1432 1432 */ 1433 1433 extractConfiguration: function() { 1434 1435 var center = this.map.getCenter(); 1434 1436 var config = { 1435 ows: {} 1437 ows: {}, 1438 map: { 1439 center: [center.lon, center.lat], 1440 zoom: this.map.zoom, 1441 layers: [] 1442 } 1436 1443 }; 1437 1438 // Map configuration1439 1440 var center = this.map.getCenter();1441 1442 config.map = {1443 center: [center.lon, center.lat],1444 zoom: this.map.zoom1445 };1446 1447 var sourcesUsed = {};1448 1449 //Layers configuration1450 config.map.layers = [];1451 1444 1452 1445 this.layers.each(function(layerRecord){ … … 1464 1457 return; 1465 1458 } 1466 1467 sourcesUsed[source.get("identifier")] = source.get("url");1459 // add source 1460 config.ows[source.get("identifier")] = source.get("url"); 1468 1461 1469 var c ={1462 config.map.layers.push({ 1470 1463 name: layerRecord.get("name"), 1464 title: layerRecord.get("title"), 1471 1465 visibility: layer.getVisibility(), 1472 1466 background: layerRecord.get('background'), 1473 1467 ows: source.get("identifier") 1474 }; 1475 1476 config.map.layers.push(c); 1468 }); 1477 1469 } 1478 1470 }, this); 1479 1480 // Source configuration1481 for (identifier in sourcesUsed) {1482 config.ows[identifier] = sourcesUsed[identifier];1483 }1484 1471 1485 1472 return config;