Pass information from CGI through Map file to OVF file and do a SQL Where
Todd Birkenholtz
toddbirkey at YAHOO.COM
Fri Jan 14 14:50:41 PST 2005
Thank you Frank.
I have tried the %variable% method to get the variable into the Map file but my OVF file is external to the MAP file.
I can not get the variables into the OVF file
Now if I only could get the OVF inline with the MAP file I think I could get it to work.
Any time I uncomment the inline method I get an error. but when I use the external method it works.
Any suggestions?
Thanks again.
my map file is like this....
###################################################
#
# NodeID
#NodeID
LAYER
NAME nodeid
TYPE POINT
CONNECTIONTYPE OGR
CONNECTION "c:\inetpub\wwwroot\maptest\office.ovf "
#CONNECTION'<OGRVRTDataSource>
# <OGRVRTLayer name="MyPoints">
# <SrcDataSource>ODBC:xxx/xxxr at xxx,xxx</SrcDataSource>
#
# <SrcSQL>SELECT lat,lon from WANINFO where NodeID ='officeABC'</SrcSQL>
# <GeometryType>wkbPoint</GeometryType>
# <GeometryField encoding="PointFromColumns" x="lon" y="lat"/>
#</OGRVRTLayer>
#</OGRVRTDataSource>'
DUMP TRUE # for WFS only
DATA "MyPoints"
STATUS on
CLASS
symbol "circle2"
size 10
color 0 0 0
END
END
###################################################
SYMBOL
NAME "circle2"
TYPE ellipse
FILLED false
POINTS
1 1
END
END
my office.ovf file is like this.....
<OGRVRTDataSource>
<OGRVRTLayer name="MyPoints">
<SrcDataSource>ODBC:xxx/xx at xx,xx</SrcDataSource>
<SrcSQL>SELECT lat,lon from WANINFO where NodeID ='officeABC'</SrcSQL>
<GeometryType>wkbPoint</GeometryType>
<GeometryField encoding="PointFromColumns" x="lon" y="lat"/>
</OGRVRTLayer>
</OGRVRTDataSource>
Frank Warmerdam <fwarmerdam at gmail.com> wrote:
On Fri, 14 Jan 2005 13:03:01 -0800, Todd Birkenholtz
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....
>
>
> ODBC:user/user at things,stuff
>
> SELECT lat,lon from secretplaces where
> thespot='???Information from CGI ???'
> wkbPoint
>
>
>
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
---------------------------------
Do you Yahoo!?
All your favorites on one personal page Try My Yahoo!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050114/38bf99f8/attachment.htm>
More information about the MapServer-users
mailing list