[mapserver-users] PHP run-time substitute CGI parameter problem

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Fri Nov 9 17:13:23 PST 2012


Substitution is only done via the CGI. If you're using MapScript just change the value directly.

Steve

________________________________________
From: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] on behalf of akoel [akoel at freemail.hu]
Sent: Friday, November 09, 2012 6:11 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] PHP run-time substitute CGI parameter problem

I have this part of a MAP file:

/LAYER
...
  DATA .....  =%selected_nid% ....
---
  VALIDATION
    "selected_nid"  "^[0-9]+$"
  END
...
END/

I want to substitute the "selected_nid" variable in run-time under PHP
script. (I can do it with Openlayers)
The problem is that I could not find any Layer-function for this. Somebody
has any idea what can I do?

I thought that there was an alternative for this problem. I put the variable
into the METADATA section like this:

/LAYER
...
  DATA .....  =%selected_nid% ....
---
  METADATA
    "selected_nid*_validation_pattern*"  "^[0-9]+$"
  END
...
END/

And in the PHP script I wrote this:

/...
$selected_layer->setMetaData( "selected_nid", $selected_nid );
...
/

But it did not substituted the variable.

thanks in advance



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/PHP-run-time-substitute-CGI-parameter-problem-tp5015290.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
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