[mapserver-users] Mapserver 5 and Openlayers 2.5 passingof parameters.

Aileen aileen.baylon at cybersoft.ph
Fri Apr 11 04:32:27 EDT 2008


Hi Steve,

We were able to implement the lines and polygons already...it was a big 
help. Thanks!

Now we have a problem regarding passing multiple values from mapserver to 
openlayers.

We have tried this:

e.g. ...&foo_value=value1 value2&...

but with no avail.

We are trying to implement thematic mapping and routing functionalities for 
the map.

I hope you can enlighten us on this.



----- Original Message ----- 
From: "Steve Lime" <Steve.Lime at dnr.state.mn.us>
To: "Aileen" <aileen.baylon at cybersoft.ph>; <mapserver-users at lists.osgeo.org>
Sent: Thursday, April 10, 2008 1:45 AM
Subject: Re: [mapserver-users] Mapserver 5 and Openlayers 2.5 passingof 
parameters.


Hi Aileen: The direct setting of class expressions using via the syntax 
you're trying is no
longer supported. It's not possible to apply any validation rules in this 
case. There is a work
around using runtime substitution though. For example, if your mapfile looks 
like this:

  LAYER
    NAME 'foo'
    ...
    CLASS
       EXPRESSION '%foo_value%'
       ...
    END
  END

Then you can set the expression like so:

  ...&foo_value=makati&...

You can also validate the input using a regex, just add a metadata block 
like this to the layer above:

  METADATA
    # allow foo_value to be a string 1 to 10 chars in length, no special 
characters
    foo_value_validation_pattern '^[a-z]{1,10}$'
  END

This applies to FILTERs as well.

The syntax to change a class color is documented in the examples you've 
already seen.

Steve

>>> On 4/8/2008 at 8:25 PM, in message 
>>> <10A58E451AF7442E8B186020DDBA59ED at Aileen>,
"Aileen" <aileen.baylon at cybersoft.ph> wrote:

> ----- Original Message ----- 
> From: "Aileen" <aileen at mapcentral.ph>
> To: <mapserver-users at lists.osgeo.org>
> Sent: Wednesday, April 09, 2008 8:28 AM
> Subject: Mapserver 5 and Openlayers 2.5 passing of parameters.
>
>
>>> Hi all,
>>>
>> We are currently using the latest release of Mapserver, the 5.0.2 version
>> and Openlayers 2.5
>>>
>>> We are having problems with rendering lines and polygons because 
>>> although
>>> it worked for us in Mapserver 4.10, we are told that there's a new 
>>> syntax
>>> for passing values to mapserver.
>>>
>>> Currently, here's part of the url that we are using to pass to 
>>> mapserver:
>>>
>>> map_layer_class_expression=makati&map_layer_class_color=255 0 0.
>>>
>>>
>>> We already have looked at your samples but with no avail.
>>>
>>> Can you help us with the new syntax?
>>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users





More information about the mapserver-users mailing list