make spatial filter configurable for OpenLayers.Control.GetFeature, p=rdewit, r=me (closes #2325)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9770 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
bartvde
2009-11-02 07:12:53 +00:00
parent cf4c14a1e4
commit d9fd39d547
2 changed files with 21 additions and 5 deletions

View File

@@ -3,7 +3,7 @@
<script src="../../lib/OpenLayers.js"></script>
<script type="text/javascript">
function test_Control_GetFeature_constructor(t) {
t.plan(2);
t.plan(3);
var protocol = "foo";
var control = new OpenLayers.Control.GetFeature({
protocol: protocol
@@ -12,6 +12,13 @@
"new OpenLayers.Control.SelectFeature returns an instance");
t.eq(control.protocol, "foo",
"constructor sets protocol correctly");
control = new OpenLayers.Control.GetFeature({
filterType: OpenLayers.Filter.Spatial.INTERSECTS
});
t.eq(control.filterType, OpenLayers.Filter.Spatial.INTERSECTS,
"constructor sets filterType correctly");
}
function test_Control_GetFeature_select(t) {