[OpenLayers-Users] KML layer filter

AlessioDL alessio.dilorenzo at gmail.com
Tue Mar 30 04:47:21 EDT 2010


Hi,

I have a KML layer and I'd like to filter it.
With the same method I always used for WFS does not work:

var myFilter = new OpenLayers.Filter.Comparison({
	type: OpenLayers.Filter.Comparison.EQUAL_TO,
	property: 'name',
	value: 'Area_01'
});
	
var myLayer = new OpenLayers.Layer.Vector("KML", {
    	projection: map.displayProjection,
        strategies: [new OpenLayers.Strategy.BBOX()],
	filter: myFilter,
        protocol: new OpenLayers.Protocol.HTTP({
            url: "kml/myKML.kml",
            format: new OpenLayers.Format.KML({
            	extractStyles: true,
                extractAttributes: true
            })
        })
});
-- 
View this message in context: http://n2.nabble.com/KML-layer-filter-tp4823365p4823365.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list