Thanks for your help Richard, I think I am closer, but I haven't got it yet to the point I can write it up!

After struggling to work out the validation thing, I can run the script, but as soon as I use mode=itemquery I return a list of locations, and a querymap, beautifully shrunk down to show only the polygon I am interested in.

However, I was hoping to be able to use this function in the main window - as an example say I was looking for roadside stops by name, it could then "zoom" me to the one I wanted, and I could continue panning or zooming.

http://remote.local/cgi-bin/mapserv? layer=coastline&layer=roads&layer=location
&layer=stops&mode=itemquery&qlayer=stops&qstring=gid=342
&map=%2FLibrary%2FWebServer%2FDocuments%2Froads% 2Froads.map&mapext=shapes&iw=650&ih=550

but if I use mode=browse, I just get my normal interface, with a quarter of Australia to zoom in from!

I'm guessing the better option may just be to make the select list with the extents of each object, queried from the database, so when the form is submitted that is the mapext value.

cheers

Ben


On 21/12/2007, at 10:38 AM, Richard Greenwood wrote:

Using mode=itemnquery is a pretty standard way to do it. Several other
parameters are required. e.g.:

qitem=gid&qlayer=poly_layer&mapext=shapes&qstring=poly_gid

Another way, with PostGIS, you can also query the extent of one or
more polygons and then pass that extent to mapserv with mode=map.

--
Richard Greenwood
[EMAIL PROTECTED]
www.greenwoodmap.com

--

Ben Madin
REMOTE INFORMATION

t : +61 8 9192 5455
f : +61 8 9192 5535
m : 0448 887 220
Broome   WA   6725

[EMAIL PROTECTED]



                                                        Out here, it pays to 
know...


Reply via email to