On Thu, Aug 5, 2010 at 2:28 PM, Arnd Wippermann <arnd.wipperm...@web.de> wrote:
> Hi Eric,
>
> thanks for the reply and the hint. It's a more complex situation.
>
> It's not a problem with the filter, but with OpenLayers.Format.SLD().read:
>
> I create a SLD and apply it to a vector layer
>
> var formatSLD = new OpenLayers.Format.SLD();
> var sld       = formatSLD.read(theSLD_BODY);
> ...
>
> It works perfect, but only the LIKE-filter with "." works not.
>
> The filterpart from theSLD_BODY for this case looks like
>
> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc";>
> <ogc:PropertyIsLike wildCard="*" singleChar="." escape="!">
> <ogc:PropertyName>indice</ogc:PropertyName>
> <ogc:Literal>.2</ogc:Literal>
> </ogc:PropertyIsLike>
> </ogc:Filter>
>
> The ".2" enters the function OpenLayers.Filter.Comparison.value2regex
>
> as 0.2 as number (typeof this.value -> number ?!)
>
> and causes the error "this.value.replace is not a function".
>
> if I overwrite the function by adding this.value=this.value.toString(), then
> the error vanishes, but the applied rule to the vector layer doesn't result
> in a correct style.
>
> Appling the same SLD to the WMS layer, shows the correct style. It seems,
> the SLD is correct.
>
> I remember a case with labels like 02.09, that change to 2.09. Perhaps the
> same issue.
>
> If you have any hint, where to further look?

Does the attached patch solve the problem?

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com

Attachment: patch
Description: Binary data

_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to