Resubmit Question: ms4w, variable substitution, mapfile EXTENT object attr

Matt Pettis matt.pettis at THOMSON.COM
Wed Dec 6 13:36:59 EST 2006


No one answered this question, so I am resubmitting:
----------------
Hi,

I am trying to write a mapfile that will use javascript to dynamically
sent EXTENT values to a .map file via POST parms. Concretely, when I
select a county in MN from a dropdown, I want to send the appropriate
values for the EXTENT bbox so that the selected county is rendered in
it's specific bbox.

The beginning of my mapfile looks like this:

---

MAP

IMAGETYPE PNG

EXTENT %xmin% "%ymin%" "%xmax%" "%ymax%"

SIZE 880 660

...

---

the url i issue is:

http://localhost/cgi-bin/mapserv.exe?map=C%3A%5Cms4w%5CApache%5Chtdocs%5
Ctest_postgis2%5CDynSQL_ByCounty%5Cmap.map&map_web_imagepath=C%3A%5Cms4w
%5CApache%5Chtdocs%5Ctmp%5C&mode=map&xmin=439430.71875&ymin=4959166&xmax
=486045.78125&ymax=5010473.5&coid=27
<http://localhost/cgi-bin/mapserv.exe?map=C%3A%5Cms4w%5CApache%5Chtdocs%
5Ctest_postgis2%5CDynSQL_ByCounty%5Cmap.map&map_web_imagepath=C%3A%5Cms4
w%5CApache%5Chtdocs%5Ctmp%5C&mode=map&xmin=439430.71875&ymin=4959166&xma
x=486045.78125&ymax=5010473.5&coid=27> 

the error i get is:

getDouble(): Symbol definition error. Parsing error near (%):(line 7) 

line 7 is the EXTENT line.

So, my questions are:

1. Does MapServer support variable substitition for extent values? If
so, what am i doing wrong? If not, how do I dynamically set the extent
for dynamically selected polygons with different bboxes?

2. Is there a better way to set the bbox rather than send it
precalculated values in a GET? It seems natural that I should be able to
leave the EXTENT line off and a default of the smallest bounding box
that works for the returned geometry would be returned as a default.

tia,

Matt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20061206/e0ee20bb/attachment.html


More information about the mapserver-users mailing list