[mapserver-users] setFilter problem (c#)

Paul james pauljame at gmail.com
Mon Apr 6 13:00:38 EDT 2009


Thanks Tamas...
I found the problem...

The correct filter to postgis is :

"(gid='10')"

On Mon, Apr 6, 2009 at 12:11 PM, Tamas Szekeres <szekerest at gmail.com> wrote:

> Then the filter is passed directly to the database in the SQL WHERE clause.
> You might want to enable logging the SQL statements at the server and see
> what gets executed when the layer is drawn.
>
> Best regards,
>
> Tamas
>
>
>
> 2009/4/6 Paul james <pauljame at gmail.com>
>
> Hi Tamas!
>> It´s a Postgis layer...And the extent is fine...
>> Any ideia?
>>
>> Thanks
>>
>>
>> On Sat, Apr 4, 2009 at 3:52 PM, Tamas Szekeres <szekerest at gmail.com>wrote:
>>
>>> Paul,
>>>
>>> Which data source are you using? It highly depends on the type of the
>>> data source how the filter is interpreted by mapserver.
>>> Are you sure there are matching features within the extent you have?
>>>
>>> Best regards,
>>>
>>> Tamas
>>>
>>>
>>>
>>> 2009/4/3 Paul james <pauljame at gmail.com>
>>>
>>>>  Hello guys...
>>>> I got a problem...
>>>> My code :
>>>>
>>>> ----
>>>> var _filter = "('[gid]'='10')";
>>>> var _layer = _map.MapObj.getLayerByName("X");
>>>>
>>>> var _lC = _layer.clone();
>>>> _lC.setFilter(_filter);
>>>> _lC.name = "Dummy";
>>>> _lC.status = 1;
>>>> _lC.getClass(0).getStyle(0).color.setRGB(0, 250, 250);
>>>> _lC.getClass(0).getStyle(0).outlinecolor.setRGB(0, 250, 0);
>>>> _map.MapObj.insertLayer(_lC, _map.MapObj.numlayers-1);
>>>> ....
>>>> -----
>>>>
>>>> No error, but the filter layer doest appear... If I took of the filter
>>>> line, the layer shows up ok...
>>>>
>>>> Any idea?
>>>>
>>>> []´s
>>>>
>>>> _______________________________________________
>>>> mapserver-users mailing list
>>>> mapserver-users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090406/7d96c107/attachment.html


More information about the mapserver-users mailing list