[Users] GeoExt 1.1 FeatureStore featurefilter
Frederick-Claud Dimmer
gi08b07 at hs-nb.de
Tue Oct 29 20:33:49 CET 2013
Hey,
I'm new to GeoExt and ExtJS, and I've started to set up an small
project. Within this project I get my features dynamically generated by
an MySQL-database as KML. I import the features as an
OpenLayers.Layer.Vecor, store them in a GeoExt.data.FeatureStore and
output them in a grid-panel. Now I'd like to filter my features
according to certain parameters.
Firebug does not output any errors in the script. Noneonetheless I do
not get a filtered result in my grid-panel. What am I missing?
Here's my codesnippet:|
|
|var events= new OpenLayers.Layer.Vector("events", {
preFeatureInsert: function(feature) {
feature.geometry.transform(
new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()
);
}
});
var store= new GeoExt.data.FeatureStore({
layer: events,
fields: [
{name: "name", type: "string"},
{name: "description", type: "string"}
],
proxy: new GeoExt.data.ProtocolProxy({
protocol: new OpenLayers.Protocol.HTTP({
url: "./php/phpsql_events.php",
format: new OpenLayers.Format.KML({
extractStyles: true,
extractAttributes: true
})
})
}),
featureFilter: new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.EQUAL_TO,
property: "name",
value: "value"
}),
autoLoad: true
});|
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20131029/7bfe7d47/attachment-0001.htm
More information about the Users
mailing list