Hi to all,<br><br>I have a strange problem in my application. I have 2 WMS layers, make with the next code:<br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> var Servicios = new OpenLayers.Layer.WMS(<br>
"Servicios", "<a href="http://localhost:8080/geoserver/wms">http://localhost:8080/geoserver/wms</a>",<br> {<br> layers: 'osmius:usuarios_servicios',<br>
srs: 'EPSG:4326',<br> format: format,<br> transparent : 'true',<br> projection: "EPSG:4326"<br> },<br> {buffer: 0,singleTile: true, ratio: 1} <br>
);</span><br clear="all"><br>I also have 2 Google Layers, make to this form:<br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> var gmap = new OpenLayers.Layer.Google(</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> "Google Streets", // the default</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> {numZoomLevels: 20}</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> );</span><br><br>After I have a Javascript function where I filter the WMS data:<br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> function cargaTodasInstanciasServicio(filtro){</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> //carga todas las instancias del servicio</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> cargaServicios(filtro);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> var filtro_temp = "IDN_SERVICE='" + filtro + "'" ;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> var filterParams = {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> cql_filter: null</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> };</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> if (OpenLayers.String.trim(filtro_temp) != "") {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> filterParams["cql_filter"] = filtro_temp;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> //aplico el filtro pero a la capa instancias;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> var a_wms = wmses[1];</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> a_wms.mergeNewParams(filterParams);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> }</span><br><br>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.<br><br>Do you know, with my short explanation, which would the problem??<br>
<br>Thanks.<br><br><br>-- <br># michogar<br># Analista Programador SIG<br># GNU/Linux Counter 462666<br><br>Una visión personal:<br>
<a href="http://michogar.blogspot.com" target="_blank">http://michogar.blogspot.com</a><br><br>El dia a dia: <br>
<a href="http://twitter.com/michogar" target="_blank">http://twitter.com/michogar</a><br><br><br>Sent from Madrid, Spain