[OpenLayers-Users] combine two OCG filters
    Lee M. 
    w_ward_W at hotmail.com
       
    Wed Apr 11 03:56:22 EDT 2012
    
    
  
*i need to combine two OCG filters. each one works separably but if i
combine them using Filter.Logical.OR, the first one works only.*
var c_filter = new OpenLayers.Filter.Logical({
type: OpenLayers.Filter.Logical.OR,
filters: [
new OpenLayers.Filter.Comparison({ 
    type: OpenLayers.Filter.Comparison.EQUAL_TO,
    matchCase:false,
    property: 'id',
    value:(document.getElementById("Text")).value    
    }),   		
new OpenLayers.Filter.Comparison({ 
    type: OpenLayers.Filter.Comparison.LIKE,
    matchCase:false,
    property: 'name',
    value: "*" +(document.getElementById("Text")).value + "*"   
    }),   		
    ]
}); 
*i use openlayers 2.11*
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/combine-two-OCG-filters-tp4827842p4827842.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
    
    
More information about the Users
mailing list