problem with zoom to selected object
Richard Greenwood
richard.greenwood at GMAIL.COM
Tue Aug 31 10:30:30 PDT 2004
Are you using mode=itemnquery (mode=itemquery)? This mode will zoom to
the selected object(s) and highlight them. The other important
parameters are:
qlayer= (name of layer to query)
qitem= (field name in the shape file to query)
qstring= (values for query, this comes from you drop down list and may
be a regular expression if you want more than one object for your
shape file)
mapext=shapes (this tells mapserver to zoom to the selection)
savequery=true (optional - allows a query to be persistent across
pans, zooms, etc.)
HTH,
Rich
On Tue, 31 Aug 2004 17:25:22 +0200, Tomasz Wlaz?owski
<wlazlowski at igpik.waw.pl> wrote:
> I try to obtain (in main map window) zoomed view to selected object from drop down list
> based on shape file.
> I'm wondering how obtain it using mapserver
> ver.4.01 + javascript?
>
> I use class_expression mode:
> <input type="hidden" name="layer" value="Qroads">
> <input type="hidden" name="map_Qroads_class_expression value = "[STREET]">
> <SELECT value="1" NAME="map_Qroads_class_expression"
> onchange="javascript:Doit();">
> <OPTION value="none"> select street </OPTION>
> <OPTION value="abc">street_A</OPTION>
> <OPTION value="cde">street_B</OPTION>
> <OPTION value="efg">street_C</OPTION>
>
> As You can see I have a layer named 'Qroads' and so far I know how to
> pass to app ID value from [STREET] COLUMN to see selected object in main
> map. Next step that I need to do is pass its extends to obtain zoomed
> map to this object.
>
> Could any body give me some short instructions, ideas?
>
> Tomasz Wlazlowski
>
> wlazlowski at igpik.waw.pl
>
> .
>
--
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com
More information about the MapServer-users
mailing list