Ignore:
Timestamp:
03/24/09 21:42:54 (9 years ago)
Author:
tschaub
Message:

merge r246:HEAD from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/opengeo/geoexplorer/tests/data/LayerStore.html

    r238 r264  
    1717            var map = createMap();
    1818
    19             mapPanel = new GeoExt.MapPanel({
     19            var mapPanel = new GeoExt.MapPanel({
    2020                // panel options
    2121                id: "map-panel",
     
    4242
    4343            map.addLayer(layer);
    44 
    45             t.eq(map.layers.length,1,"Adding layer to map does not create duplicate layers on map");
    46             t.eq(mapPanel.layers.getCount(),1,"Adding layer to map does not create duplicate records in LayerStore");
     44            t.eq(map.layers.length, 1, "Adding layer to map does not create duplicate layers on map");
     45            t.eq(mapPanel.layers.getCount(), 1, "Adding layer to map does not create duplicate records in LayerStore");
    4746
    4847            mapPanel.layers.remove(mapPanel.layers.getById(layer.id));
    49 
    5048            t.eq(map.layers.length,0,"removeLayer on MapPanel's LayerStore removes layer from map");
    5149            t.eq(mapPanel.layers.getCount(),0,"removeLayer on MapPanel's LayerStore removes layer from map");
    5250
    53             mapPanel.layers.add(new GeoExt.data.LayerRecord(layer));
     51            var reader = new GeoExt.data.LayerReader();
     52            mapPanel.layers.add((reader.readRecords([layer])).records);
    5453            t.eq(map.layers.length,1,"Adding layer to MapPanel's LayerStore adds only one layer to map");
    5554            t.eq(mapPanel.layers.getCount(),1,"Adding layers to MapPanel's LayerStore does not create duplicate layers");
    56 
    57 
    5855        }
    5956    </script>
Note: See TracChangeset for help on using the changeset viewer.