source:
trunk/workshop-routing-foss4g/web/OpenLayers/lib/OpenLayers/Filter.js
@
76
Revision 76, 1.7 KB checked in by djay, 12 years ago (diff) | |
---|---|
|
Line | |
---|---|
1 | /* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for |
2 | * full list of contributors). Published under the Clear BSD license. |
3 | * See http://svn.openlayers.org/trunk/openlayers/license.txt for the |
4 | * full text of the license. */ |
5 | |
6 | |
7 | /** |
8 | * @requires OpenLayers/Util.js |
9 | * @requires OpenLayers/Style.js |
10 | */ |
11 | |
12 | /** |
13 | * Class: OpenLayers.Filter |
14 | * This class represents an OGC Filter. |
15 | */ |
16 | OpenLayers.Filter = OpenLayers.Class({ |
17 | |
18 | /** |
19 | * Constructor: OpenLayers.Filter |
20 | * This is an abstract class. Create an instance of a filter subclass. |
21 | * |
22 | * Parameters: |
23 | * options - {Object} Optional object whose properties will be set on the |
24 | * instance. |
25 | * |
26 | * Returns: |
27 | * {<OpenLayers.Filter>} |
28 | */ |
29 | initialize: function(options) { |
30 | OpenLayers.Util.extend(this, options); |
31 | }, |
32 | |
33 | /** |
34 | * APIMethod: destroy |
35 | * Remove reference to anything added. |
36 | */ |
37 | destroy: function() { |
38 | }, |
39 | |
40 | /** |
41 | * APIMethod: evaluate |
42 | * Evaluates this filter in a specific context. Should be implemented by |
43 | * subclasses. |
44 | * |
45 | * Parameters: |
46 | * context - {Object} Context to use in evaluating the filter. If a vector |
47 | * feature is provided, the feature.attributes will be used as context. |
48 | * |
49 | * Returns: |
50 | * {Boolean} The filter applies. |
51 | */ |
52 | evaluate: function(context) { |
53 | return true; |
54 | }, |
55 | |
56 | /** |
57 | * APIMethod: clone |
58 | * Clones this filter. Should be implementted by subclasses. |
59 | * |
60 | * Returns: |
61 | * {<OpenLayers.Filter>} Clone of this filter. |
62 | */ |
63 | clone: function() { |
64 | return null; |
65 | }, |
66 | |
67 | CLASS_NAME: "OpenLayers.Filter" |
68 | }); |
Note: See TracBrowser
for help on using the repository browser.