points variable substitution
Shorthouse, David
dps1 at UALBERTA.CA
Sat Mar 17 00:17:31 PDT 2007
Should have done a bit more thinking and reading. A dummy OGR Connection
does the trick:
CONNECTIONTYPE OGR
CONNECTION '<OGRVRTDataSource>
<OGRVRTLayer name="Whatever">
<SrcDataSource>ODBC:Whatever/whatever at whatever</SrcDataSource>
<SrcSQL>SELECT %lng% as Longitude, %lat%
as Latitude</SrcSQL>
<GeometryType>wkbPoint</GeometryType>
<LayerSRS>WGS84</LayerSRS>
<GeometryField
encoding="PointFromColumns" x="Longitude" y="Latitude"/>
</OGRVRTLayer>
</OGRVRTDataSource>'
David P. Shorthouse
------------------------------------------------------
Department of Biological Sciences
CW-403, Biological Sciences Centre
University of Alberta
Edmonton, AB T6G 2E9
<mailto:dps1 at ualberta.ca> mailto:dps1 at ualberta.ca
<http://canadianarachnology.webhop.net>
http://canadianarachnology.webhop.net
<http://arachnidforum.webhop.net> http://arachnidforum.webhop.net
<http://www.spiderwebwatch.org/> http://www.spiderwebwatch.org
------------------------------------------------------
From: Shorthouse, David [mailto:dps1 at ualberta.ca]
Sent: Saturday, March 17, 2007 1:06 AM
To: 'mapserver-users at lists.umn.edu'
Subject: points variable substitution
I am wanting to plot one point as provided by a cgi query parameter for a
very simple application, but substituting something like POINTS -113 45 END
with POINTS %lng% %lat% END doesn't work like I thought it would. Any
suggestions for how to pass a point via URL parameters (e.g.
&lng=-113&lat=45) & have it appear on a resultant map?
Thanks,
David P. Shorthouse
------------------------------------------------------
Department of Biological Sciences
CW-403, Biological Sciences Centre
University of Alberta
Edmonton, AB T6G 2E9
mailto:dps1 at ualberta.ca
http://canadianarachnology.webhop.net
http://arachnidforum.webhop.net
http://www.spiderwebwatch.org <http://www.spiderwebwatch.org/>
------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070317/f24468ed/attachment.htm>
More information about the MapServer-users
mailing list