1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
---|
2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
3 | |
---|
4 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
5 | <head> |
---|
6 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
7 | |
---|
8 | <title>GeoExt.data.FeatureStore — GeoExt v1.0</title> |
---|
9 | <link rel="stylesheet" href="../../../_static/geoext.css" type="text/css" /> |
---|
10 | <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" /> |
---|
11 | <script type="text/javascript"> |
---|
12 | var DOCUMENTATION_OPTIONS = { |
---|
13 | URL_ROOT: '../../../', |
---|
14 | VERSION: '1.0', |
---|
15 | COLLAPSE_MODINDEX: false, |
---|
16 | FILE_SUFFIX: '.html', |
---|
17 | HAS_SOURCE: true |
---|
18 | }; |
---|
19 | </script> |
---|
20 | <script type="text/javascript" src="../../../_static/jquery.js"></script> |
---|
21 | <script type="text/javascript" src="../../../_static/doctools.js"></script> |
---|
22 | <link rel="shortcut icon" href="../../../_static/favicon.ico"/> |
---|
23 | <link rel="top" title="GeoExt v1.0" href="../../../index.html" /> |
---|
24 | <link rel="up" title="GeoExt.data" href="../data.html" /> |
---|
25 | <link rel="next" title="GeoExt.data.LayerReader" href="LayerReader.html" /> |
---|
26 | <link rel="prev" title="GeoExt.data.FeatureRecord" href="FeatureRecord.html" /> |
---|
27 | |
---|
28 | |
---|
29 | |
---|
30 | |
---|
31 | |
---|
32 | |
---|
33 | </head> |
---|
34 | <body> |
---|
35 | <div class="header"> |
---|
36 | <div class="wrap"> |
---|
37 | <h1 id="logo"><a href="../../../index.html">GeoExt</a></h1> |
---|
38 | <ul id="top-nav"> |
---|
39 | <li class="first"><a href="../../../docs.html">Documentation</a></li> |
---|
40 | <li><a href="../../../examples.html">Examples</a></li> |
---|
41 | <li><a href="../../../downloads.html">Download</a></li> |
---|
42 | <li><a href="http://trac.geoext.org/">Development</a></li> |
---|
43 | </ul> |
---|
44 | <div id="searchbox"> |
---|
45 | <form class="search" action="../../../search.html" method="get"> |
---|
46 | <input id="searchbox-query" type="text" name="q" size="25" value="Search …" tabindex="3" onblur="if(this.value=='') this.value='Search …';" onfocus="if(this.value=='Search …') this.value='';" /> |
---|
47 | <input id="searchbox-submit" type="image" value="Search" src="../../../_static/img/search_icon_green.png" /> |
---|
48 | <input type="hidden" name="check_keywords" value="yes" /> |
---|
49 | <input type="hidden" name="area" value="default" /> |
---|
50 | </form> |
---|
51 | </div> |
---|
52 | </div> |
---|
53 | </div> |
---|
54 | |
---|
55 | <div class="related"> |
---|
56 | <h3>Navigation</h3> |
---|
57 | <ul> |
---|
58 | <li><a href="../../../index.html">GeoExt</a> »</li> |
---|
59 | <li><a href="../../index.html" >API Reference</a> »</li> |
---|
60 | <li><a href="../data.html" accesskey="U"><tt class="docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal"><span class="pre">GeoExt.data</span></tt></a> »</li> |
---|
61 | <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.data.FeatureStore</span></tt></a></li> |
---|
62 | </ul> |
---|
63 | </div> |
---|
64 | |
---|
65 | <div class="sphinxsidebar"> |
---|
66 | <div class="sphinxsidebarwrapper"> |
---|
67 | <h3><a href="../../../index.html">Table Of Contents</a></h3> |
---|
68 | <ul> |
---|
69 | <li><a class="reference external" href="#"><tt class="docutils literal"><span class="pre">GeoExt.data.FeatureStore</span></tt></a><ul> |
---|
70 | <li><a class="reference external" href="#example-use">Example Use</a></li> |
---|
71 | <li><a class="reference external" href="#config-options">Config Options</a></li> |
---|
72 | <li><a class="reference external" href="#public-methods">Public Methods</a></li> |
---|
73 | </ul> |
---|
74 | </li> |
---|
75 | </ul> |
---|
76 | |
---|
77 | <h4>Previous topic</h4> |
---|
78 | <p class="topless"><a href="FeatureRecord.html" |
---|
79 | title="previous chapter"><tt class="docutils literal docutils literal docutils literal"><span class="pre">GeoExt.data.FeatureRecord</span></tt></a></p> |
---|
80 | <h4>Next topic</h4> |
---|
81 | <p class="topless"><a href="LayerReader.html" |
---|
82 | title="next chapter"><tt class="docutils literal"><span class="pre">GeoExt.data.LayerReader</span></tt></a></p> |
---|
83 | </div> |
---|
84 | </div> |
---|
85 | |
---|
86 | |
---|
87 | <div class="document"> |
---|
88 | <div class="documentwrapper"> |
---|
89 | <div class="bodywrapper"> |
---|
90 | <div class="body"> |
---|
91 | |
---|
92 | <div class="section" id="geoext-data-featurestore"> |
---|
93 | <h1><a title="GeoExt.data.FeatureStore" class="reference internal" href="#GeoExt.data.FeatureStore"><tt class="xref docutils literal"><span class="pre">GeoExt.data.FeatureStore</span></tt></a><a class="headerlink" href="#geoext-data-featurestore" title="Permalink to this headline">¶</a></h1> |
---|
94 | <dl class="meta docutils"> |
---|
95 | <dt>Extends</dt> |
---|
96 | <dd><ul class="first last simple"> |
---|
97 | <li><a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.data.Store">Ext.data.Store</a></li> |
---|
98 | </ul> |
---|
99 | </dd> |
---|
100 | </dl> |
---|
101 | <dl class="class"> |
---|
102 | <dt id="GeoExt.data.FeatureStore"> |
---|
103 | <em class="property">class </em><tt class="descclassname">GeoExt.data.</tt><tt class="descname">FeatureStore</tt><a class="headerlink" href="#GeoExt.data.FeatureStore" title="Permalink to this definition">¶</a></dt> |
---|
104 | <dd>A store containing <a title="GeoExt.data.FeatureRecord" class="reference external" href="FeatureRecord.html#GeoExt.data.FeatureRecord"><tt class="xref docutils literal"><span class="pre">GeoExt.data.FeatureRecord</span></tt></a> entries that |
---|
105 | optionally synchronizes with an <tt class="docutils literal"><span class="pre">OpenLayers.Layer.Vector</span></tt>.</dd></dl> |
---|
106 | |
---|
107 | <div class="section" id="example-use"> |
---|
108 | <h2>Example Use<a class="headerlink" href="#example-use" title="Permalink to this headline">¶</a></h2> |
---|
109 | <p>Sample code to create a store with features from a vector layer:</p> |
---|
110 | <div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">store</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">GeoExt</span><span class="p">.</span><span class="nx">data</span><span class="p">.</span><span class="nx">FeatureStore</span><span class="p">({</span> |
---|
111 | <span class="nx">layer</span><span class="o">:</span> <span class="nx">myLayer</span><span class="p">,</span> |
---|
112 | <span class="nx">features</span><span class="o">:</span> <span class="nx">myFeatures</span> |
---|
113 | <span class="p">});</span> |
---|
114 | </pre></div> |
---|
115 | </div> |
---|
116 | </div> |
---|
117 | <div class="section" id="config-options"> |
---|
118 | <h2>Config Options<a class="headerlink" href="#config-options" title="Permalink to this headline">¶</a></h2> |
---|
119 | <p>Configuration properties in addition to |
---|
120 | those listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.data.Store">Ext.data.Store</a>.</p> |
---|
121 | <dl class="describe"> |
---|
122 | <dt> |
---|
123 | <tt class="descname">featureFilter</tt></dt> |
---|
124 | <dd><tt class="docutils literal"><span class="pre">OpenLayers.Filter</span></tt> This filter is evaluated before a feature |
---|
125 | record is added to the store.</dd></dl> |
---|
126 | |
---|
127 | <dl class="describe"> |
---|
128 | <dt> |
---|
129 | <tt class="descname">features</tt></dt> |
---|
130 | <dd><tt class="docutils literal"><span class="pre">Array(OpenLayers.Feature.Vector)</span></tt> Features that will be added to the |
---|
131 | store (and the layer if provided).</dd></dl> |
---|
132 | |
---|
133 | <dl class="describe"> |
---|
134 | <dt> |
---|
135 | <tt class="descname">initDir</tt></dt> |
---|
136 | <dd><tt class="docutils literal"><span class="pre">Number</span></tt> Bitfields specifying the direction to use for the |
---|
137 | initial sync between the layer and the store, if set to 0 then no |
---|
138 | initial sync is done. Default is |
---|
139 | <tt class="docutils literal"><span class="pre">GeoExt.data.FeatureStore.LAYER_TO_STORE|GeoExt.data.FeatureStore.STORE_TO_LAYER</span></tt>.</dd></dl> |
---|
140 | |
---|
141 | <dl class="describe"> |
---|
142 | <dt> |
---|
143 | <tt class="descname">layer</tt></dt> |
---|
144 | <dd><tt class="docutils literal"><span class="pre">OpenLayers.Layer.Vector</span></tt> Layer to synchronize the store with.</dd></dl> |
---|
145 | |
---|
146 | <dl class="describe"> |
---|
147 | <dt> |
---|
148 | <tt class="descname">reader</tt></dt> |
---|
149 | <dd><tt class="docutils literal"><span class="pre">Ext.data.DataReader</span></tt> The reader used to produce records from objects |
---|
150 | features. Default is <a title="GeoExt.data.FeatureReader" class="reference external" href="FeatureReader.html#GeoExt.data.FeatureReader"><tt class="xref docutils literal"><span class="pre">GeoExt.data.FeatureReader</span></tt></a>.</dd></dl> |
---|
151 | |
---|
152 | </div> |
---|
153 | <div class="section" id="public-methods"> |
---|
154 | <h2>Public Methods<a class="headerlink" href="#public-methods" title="Permalink to this headline">¶</a></h2> |
---|
155 | <p>Public methods in addition to those |
---|
156 | listed for <a class="reference external" href="http://dev.sencha.com/deploy/dev/docs/?class=Ext.data.Store">Ext.data.Store</a>.</p> |
---|
157 | <dl class="method"> |
---|
158 | <dt id="GeoExt.data.FeatureStore.bind"> |
---|
159 | <tt class="descclassname">FeatureStore.</tt><tt class="descname">bind</tt><big>(</big><big>)</big><a class="headerlink" href="#GeoExt.data.FeatureStore.bind" title="Permalink to this definition">¶</a></dt> |
---|
160 | <dd><table class="docutils field-list" frame="void" rules="none"> |
---|
161 | <col class="field-name" /> |
---|
162 | <col class="field-body" /> |
---|
163 | <tbody valign="top"> |
---|
164 | <tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>layer</em> – <tt class="docutils literal"><span class="pre">OpenLayers.Layer</span></tt> Layer that the store should be |
---|
165 | synchronized with.</td> |
---|
166 | </tr> |
---|
167 | </tbody> |
---|
168 | </table> |
---|
169 | <p>Bind this store to a layer instance, once bound the store |
---|
170 | is synchronized with the layer and vice-versa.</p> |
---|
171 | </dd></dl> |
---|
172 | |
---|
173 | <dl class="method"> |
---|
174 | <dt id="GeoExt.data.FeatureStore.getRecordFromFeature"> |
---|
175 | <tt class="descclassname">FeatureStore.</tt><tt class="descname">getRecordFromFeature</tt><big>(</big><big>)</big><a class="headerlink" href="#GeoExt.data.FeatureStore.getRecordFromFeature" title="Permalink to this definition">¶</a></dt> |
---|
176 | <dd><table class="docutils field-list" frame="void" rules="none"> |
---|
177 | <col class="field-name" /> |
---|
178 | <col class="field-body" /> |
---|
179 | <tbody valign="top"> |
---|
180 | <tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>feature</em> – <tt class="docutils literal"><span class="pre">OpenLayers.Vector.Feature</span></tt></td> |
---|
181 | </tr> |
---|
182 | <tr class="field"><th class="field-name">Returns:</th><td class="field-body"><a title="GeoExt.data.FeatureRecord" class="reference external" href="FeatureRecord.html#GeoExt.data.FeatureRecord"><tt class="xref docutils literal"><span class="pre">GeoExt.data.FeatureRecord</span></tt></a> The record corresponding |
---|
183 | to the given feature. Returns null if no record matches.</td> |
---|
184 | </tr> |
---|
185 | </tbody> |
---|
186 | </table> |
---|
187 | <p>Get the record corresponding to a feature.</p> |
---|
188 | </dd></dl> |
---|
189 | |
---|
190 | <dl class="method"> |
---|
191 | <dt id="GeoExt.data.FeatureStore.unbind"> |
---|
192 | <tt class="descclassname">FeatureStore.</tt><tt class="descname">unbind</tt><big>(</big><big>)</big><a class="headerlink" href="#GeoExt.data.FeatureStore.unbind" title="Permalink to this definition">¶</a></dt> |
---|
193 | <dd>Unbind this store from the layer it is currently bound.</dd></dl> |
---|
194 | |
---|
195 | </div> |
---|
196 | </div> |
---|
197 | |
---|
198 | |
---|
199 | </div> |
---|
200 | </div> |
---|
201 | </div> |
---|
202 | <div class="clearer"></div> |
---|
203 | </div> |
---|
204 | <div class="related"> |
---|
205 | <h3>Navigation</h3> |
---|
206 | <ul> |
---|
207 | <li class="right" style="margin-right: 10px"> |
---|
208 | <a href="../../../genindex.html" title="General Index" |
---|
209 | accesskey="I">index</a></li> |
---|
210 | <li class="right" > |
---|
211 | <a href="../../../modindex.html" title="Global Module Index" |
---|
212 | accesskey="M">modules</a> |</li> |
---|
213 | <li class="right" > |
---|
214 | <a href="LayerReader.html" title="GeoExt.data.LayerReader" |
---|
215 | accesskey="N">next</a> |</li> |
---|
216 | <li class="right" > |
---|
217 | <a href="FeatureRecord.html" title="GeoExt.data.FeatureRecord" |
---|
218 | accesskey="P">previous</a> |</li> |
---|
219 | <li><a href="../../../index.html">GeoExt</a> »</li> |
---|
220 | <li><a href="../../index.html" >API Reference</a> »</li> |
---|
221 | <li><a href="../data.html" ><tt class="docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal docutils literal"><span class="pre">GeoExt.data</span></tt></a> »</li> |
---|
222 | <li><a href="#"><tt class="docutils literal docutils literal"><span class="pre">GeoExt.data.FeatureStore</span></tt></a></li> |
---|
223 | </ul> |
---|
224 | </div> |
---|
225 | |
---|
226 | <div class="footer"> |
---|
227 | © Copyright 2009-2010, GeoExt Community. |
---|
228 | </div> |
---|
229 | </body> |
---|
230 | </html> |
---|