[mapserver-users] mapfile text modification via URL

Paco Regodón mapserver at meteologica.es
Wed Aug 25 03:22:09 EDT 2010


Hi Steve,

It worked! Thanks.

Paco



On 24/08/10 15:39, Lime, Steve D (DNR) wrote:
> Hi Paco: Try quoting the text word in the block:
>
>    VALIDATION
>        'text'   '^[a-zA-Z\-]+$'
>    END
>
> The string 'text' is a reserved word and seems to be being recognized that way by the parser.
>
> Steve
>
> ________________________________________
> From: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] On Behalf Of Paco Regodón [mapserver at meteologica.es]
> Sent: Tuesday, August 24, 2010 7:57 AM
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] mapfile text modification via URL
>
> Hello all,
>
> I'm having difficulties changing mapfile trough url with mapserver 5.6.5.
>
> This is my layer:
>
>      LAYER
>                  NAME test
>                  STATUS DEFAULT
>                  LABELCACHE OFF
>                  TRANSFORM FALSE
>                  TYPE ANNOTATION
>                  FEATURE
>                          POINTS 300 300  END
>                  END
>
>                  CLASS
>                          TEXT 'test'
>                          COLOR -1 -1 -1
>                          LABEL
>                                  COLOR 000 000 000
>                                  OUTLINECOLOR 255 255 255
>                                  SIZE MEDIUM
>                          END
>                  END
>          END
>
> This is my query:
>
> http://localhost/cgi-bin/mapserv?mode=map&map=test.map&map.layer[test].class[0]=text+'hello'
>
> ...And this is my error message:   :-)
>
> [Tue Aug 24 12:43:43 2010].949611 msValidateParameter(): Regular expression error. Parameter pattern validation failed.
> [Tue Aug 24 12:43:43 2010].949665 loadClass(): General error message. URL-based TEXT configuration failed pattern validation.
>
>
> I found RFC 44 (http://mapserver.org/development/rfc/ms-rfc-44.html) and bug #2971 (http://trac.osgeo.org/mapserver/ticket/2971).
> I have tried adding a VALIDATION block to my layer:
>
>          VALIDATION
>                  text '^[a-zA-Z\-]+$'
>          END
>
> Now, i'm getting this different error message:
>
> [Tue Aug 24 12:41:52 2010].243629 loadHashTable(): Unknown identifier. Parsing error near (text):(line 36)
> [Tue Aug 24 12:41:52 2010].243675 msFreeMap(): freeing map at 0x690420.
>
>
> How do you change text through url?
>
> Thanks,
>
> Paco Regodón
>
>
>
>
>
>    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100825/55b61e2f/attachment-0001.html


More information about the mapserver-users mailing list