Pass information from CGI through Map file to OVF file and do a SQL Where
Frank Warmerdam
fwarmerdam at GMAIL.COM
Fri Jan 14 13:29:53 PST 2005
On Fri, 14 Jan 2005 13:03:01 -0800, Todd Birkenholtz
<toddbirkey at yahoo.com> wrote:
>
>
> Is there any way to pass more information through the CGI URL ?
>
> I want to be able to use that variable and pass it to my OVF file and do a
> SQL "Where" to get that locations Longitude Latitude. Then I will place a
> symbol at that location.
>
> http://localhost/mapserver.exe?map=c:\inetpub\wwwroot\maptest\wanmap.map&mode=map&layer=states&place=xmarksthespot
>
>
> I think the OVF will look something like this....
> <OGRVRTDataSource>
> <OGRVRTLayer name="MyPoints">
> <SrcDataSource>ODBC:user/user at things,stuff</SrcDataSource>
>
> <SrcSQL>SELECT lat,lon from secretplaces where
> thespot='???Information from CGI ???'</SrcSQL>
> <GeometryType>wkbPoint</GeometryType>
> <GeometryField encoding="PointFromColumns" x="lon" y="lat"/>
> </OGRVRTLayer>
> </OGRVRTDataSource>
Todd,
I would suggest you read over:
http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#variablesubstitution
I have never tried it myself, but I think it is what you want. Also, you will
need to be quite careful about "escaping" stuff if you have odd values.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the MapServer-users
mailing list