The attribution control no longer shows duplicate attribution text. r=crschmidt (closes #2300)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9731 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -36,24 +36,20 @@
|
||||
|
||||
}
|
||||
|
||||
function test_Control_Attribution_Propertry_eliminateDuplicates(t) {
|
||||
t.plan(3);
|
||||
function test_Control_Attribution_no_duplicates(t) {
|
||||
t.plan(2);
|
||||
|
||||
control = new OpenLayers.Control.Attribution();
|
||||
map = new OpenLayers.Map("map");
|
||||
map.addControl(control);
|
||||
map.addLayer(new OpenLayers.Layer("Company A: 1",{'attribution':'company A'}));
|
||||
map.addLayer(new OpenLayers.Layer("Company A: 2",{'attribution':'company A'}));
|
||||
t.eq(control.div.innerHTML, 'company A, company A', "Attribution correct with two layers and eliminateDuplicates = false.");
|
||||
|
||||
control.destroy();
|
||||
control = new OpenLayers.Control.Attribution({eliminateDuplicates:true});
|
||||
|
||||
control = new OpenLayers.Control.Attribution();
|
||||
map.addControl(control);
|
||||
t.eq(control.div.innerHTML, 'company A', "Attribution correct with two layers and eliminateDuplicates = true.");
|
||||
|
||||
t.eq(control.div.innerHTML, 'company A', "Attribution not duplicated.");
|
||||
|
||||
map.addLayer(new OpenLayers.Layer("Company B: 1",{'attribution':'company B'}));
|
||||
map.addLayer(new OpenLayers.Layer("Company A: 3",{'attribution':'company A'}));
|
||||
t.eq(control.div.innerHTML, 'company A, company B', "Attribution correct with four layers (3 with same attribution) and eliminateDuplicates = true.");
|
||||
t.eq(control.div.innerHTML, 'company A, company B', "Attribution correct with four layers (3 with same attribution).");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user