I am trying to filter a points layer to only show points within a given radius. I have determined the best method to do this is a CQL_FILTER using DWITHIN. When I set this param and then load the map, I get broken tiles. Here is the snippet of my code in question:
var elecs = new OpenLayers.Layer.WMS(
"Elec",
"http://localhost:8080/geoserver/wms",
{
layers: "UVC:Elec_3790",
transparent: "true",
styles:"Elecs",
format: "image/png",
cql_filter: "DWITHIN(the_geom, Point(-79, 39), 50, kilometers)"
},
{isBaseLayer: false, visibility: true}
);
Removing the cql_filter line loads the map normally again but without a radius filter.
Not sure about the broken tiles, but GeoServer only supports unit of measure based searches if the data backend is Oracle at the moment (as of version 2.2-RC1)