[OpenLayers-Users] Problems with WMS filter

Micho Gar michogar at gmail.com
Tue May 26 11:31:13 EDT 2009


Hi to all,

I have a strange problem in my application. I have 2 WMS layers, make with
the next code:

    var Servicios = new OpenLayers.Layer.WMS(
                    "Servicios", "http://localhost:8080/geoserver/wms",
                    {
                        layers: 'osmius:usuarios_servicios',
                        srs: 'EPSG:4326',
                        format: format,
            transparent : 'true',
            projection: "EPSG:4326"
                    },
                    {buffer: 0,singleTile: true, ratio: 1}
        );

I also have 2 Google Layers, make to this form:

                var gmap = new OpenLayers.Layer.Google(
                    "Google Streets", // the default
                    {numZoomLevels: 20}
                );

After I have a Javascript function where I filter the WMS data:

    function cargaTodasInstanciasServicio(filtro){
        //carga todas las instancias del servicio
        cargaServicios(filtro);
        var filtro_temp = "IDN_SERVICE='" + filtro + "'" ;
        var filterParams = {
                        cql_filter: null
                };
        if (OpenLayers.String.trim(filtro_temp) != "") {
                    filterParams["cql_filter"] = filtro_temp;
        }
        //aplico el filtro pero a la capa instancias;
        var a_wms = wmses[1];
        a_wms.mergeNewParams(filterParams);
    }

My problem is that the filter result is not in the same position that the
origin, and when I move the map they back to the good position.

Do you know, with my short explanation, which would the problem??

Thanks.


-- 
# michogar
# Analista Programador SIG
# GNU/Linux Counter 462666

Una visión personal:
http://michogar.blogspot.com

El dia a dia:
http://twitter.com/michogar


Sent from Madrid, Spain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090526/0cf8b301/attachment.html


More information about the Users mailing list