[OpenLayers-Users] HOW TO USE LOGICAL FILTERS
s.williams
swilliams7_99 at yahoo.com
Wed Jul 28 10:33:51 EDT 2010
I want to combine two separate filters using a logical filter, the objective
is to use a comparison filter to set the point radius of a marker from
feature "attribute1" and use another filter to set the color of that marker
from "attribute2". Thanks for the help
Here's what I have
var rule = new OpenLayers.Rule({
filter: new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.GREATER_THAN,
property: "attribute1",
value: 5
}),
symbolizer: {graphicName:"circle",
pointRadius: 7
}
});
var rule1 = var rule = new OpenLayers.Rule({
filter: new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.LESS_THAN,
property: "attribute2",
value: 2
}),
symbolizer: {graphicName:"circle",
strokeColor: '#000000',
strokeWidth: 1,
fillColor: "#0000FF"
}
});
var rules = new OpenLayers.Filter.Logical({
filters: [rule1,rule2],
type: OpenLayers.Filter.Logical.AND})
These are just some code snippets I have written, any help on how to put
them together would be great
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/HOW-TO-USE-LOGICAL-FILTERS-tp5345691p5345691.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list