<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Ben (and Richard),<br>
<br>
I know I've been sounding like a broken record on the list lately with
regard to GeoMoose, but . . .&nbsp; :c)<br>
<br>
In one of the Demo datasets that is included with the Windows (MS4W)
version of GeoMoose, there is a selection and highlighting example
already set up for use with MapServer.<br>
<br>
The GeoMoose client framework utilizes the INCLUDE option for MapServer
mapfiles to a rather high degree, and each of these capabilities have
been included in the demo as MapFile template fragments that are used
to achieve the (your) results, both for zooming and highlighting.&nbsp;&nbsp;
There was even recently (within the last month) a how-to put together
on the subject that was posted to the GeoMoose site. <br>
<br>
See: <br>
<a class="moz-txt-link-freetext"
 href="http://www.geomoose.org/moose/documentation/how-tos/how-to-add-a-text-box-search?searchterm=zoom+to">http://www.geomoose.org/moose/documentation/how-tos/how-to-add-a-text-box-search?searchterm=zoom+to</a><br>
<br>
This is a pretty good description of how MapServer works it's magic for
lookups too.<br>
<br>
Further, if you still want go the route of pre-defining a zoom-to URL,
GeoMoose has a facility for this as well, there is a tool for doing a
Jump-to action that can be pre-populated, you can even include more
than one if needed.&nbsp; You can get more info about setting this up in the
MAPBOOK documentation at:<br>
<br>
<a class="moz-txt-link-freetext"
 href="http://www.geomoose.org/moose/documentation/configuration-guides/xml-mapbook-configuration/">http://www.geomoose.org/moose/documentation/configuration-guides/xml-mapbook-configuration/</a><br>
<br>
Specifically, look at the &lt;view&gt; tag set for details.<br>
<br>
bobb<br>
<br>
<br>
Richard Greenwood wrote:
<blockquote
 cite="mid:ae9185aa0712210602p6047ada5i7526ca48f44baf43@mail.gmail.com"
 type="cite">
  <pre wrap="">On Dec 21, 2007 6:18 AM, Ben Madin <a
 class="moz-txt-link-rfc2396E"
 href="mailto:ben@remoteinformation.com.au">&lt;ben@remoteinformation.com.au&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap=""> 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.


<a class="moz-txt-link-freetext"
 href="http://remote.local/cgi-bin/mapserv?layer=coastline&amp;layer=roads&amp;layer=location">http://remote.local/cgi-bin/mapserv?layer=coastline&amp;layer=roads&amp;layer=location</a>
&amp;layer=stops&amp;mode=itemquery&amp;qlayer=stops&amp;qstring=gid=342
&amp;map=%2FLibrary%2FWebServer%2FDocuments%2Froads%2Froads.map&amp;mapext=shapes&amp;iw=650&amp;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.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
The trick to getting the query result into your main map is to make
the TEMPLATE for the query layer be the main map. So in your map file
the template for 'stops' should be whatever your main map html file
is.

A couple more tricks. Sometimes you will need to have two versions of
your 'stops' layer with different templates. The first "stops" layer
would have a template for displaying attribute data and the style of
that layer would be the regular default style. Then the second layer,
we'll call "stops_spatial" has the main map defined as the template,
it has a FILTER %gid% so that it only shows the selected object(s) and
the style ewould be something bright and bold to show the object.

Another trick. If you want to display more than selected object in one
map (as opposed to several maps each just showing one object) then
instead of putting the main map html in the template, put it in the
HEADER for your "stops" or "stops_spatial" layer, and define an empty
html file for the template.

You can see an example of this at: <a class="moz-txt-link-freetext"
 href="http://www2.tetonwyo.org/mapserver/">http://www2.tetonwyo.org/mapserver/</a>
Select the "Property Search" link near the bottom of the page. In the
"Search by Owner" "Last Name" enter 'Smith'. This will give you a
list, click the "Map It" link.

HTH,
Rich

  </pre>
</blockquote>
</body>
</html>