Mapext from itemnquerymap?

Mike Street mike at MIKESTREET.CA
Sat Jun 9 00:59:22 EDT 2007


Hi list,

First, thanks for all the help. I've taken in as much as a lurker can,
and lately the archives have been my best friend and have solved most of
my problems. But now I'm stuck on a few things:

Specs: MS4W with a 'tricked out' version of the Itasca demo and the Rosa
applet for display. First project, so just CGI, HTML templates, and lots
of messy javascript. :)

Details: A basic browse/query/itemnquery setup to find city info (shp
layers - roads, trains, landmarks, etc.). The map displays in a main
HTML template frame, the queries display in query frame.

For query, I use a javascript call in the query frame for the Rosa
SetImageURL function to display the querymap hilited feature in the main
frame. (I haven't quite figured out the persistent hilite thing yet, but
that's not really an issue for this project).

For itemnquery, the user supplies the base of a qstring in a textbox in
the mainframe, and the query displays in the query frame. I've then set
links to the [Name] field of each layer's query template, which supplies
the final qstring for an itemnquerymap call in the query frame to
display in the main frame via the Rosa SetImageURL function. (It works
well as long as there's only one return - more on this below).

So, with that... everything works okay, except:

1. Most of my data are points layers, so I use
"scale=10000&mapext=shapes" in the itemnquerymap call to centre on the
point, but of course the main frame still 'remembers' its last extent,
so I need to reset the mapext (and other stuff) in the
parent.map_frame.document, so the user can continue on without interruption.

Question 1: How can I find the mapext used in the 'mapext=shapes' thing
from the itemnquerymap so I can set the
parent.map_frame.document.form.mapext.value?

2. This one is less important, but totally annoys me because I can't
understand it. :) Each shp file has 2 fields in common - [Name] and
[Link]. When the records are returned via the query/itemnquery queries,
I can use the value of the [Link] (i.e. http://whatever.com) to onclick
pop a new browser window and load the URL, even if there are multiple
records. But when I try the same with the [Name] field (set it as a
link, then onclick to call the script to display the itemnquerymap
(using the [Name] value as the qstring), the only value for EVERY listed
record is that of the last returned record of the itemnquery.

Question 2: So what's up with that? :)

Sorry for the length. It's probably obvious I lack the correct
terminology, so I made up for it with verbosity. :)

I'd appreciate any help, and I promise to <!--comment--> your name (and
my gratitude) into the live version. :)

Cheers, and many thanks in advance,
Mike Street




_________________________________________________________________
Need personalized email and website? Look no further. It's easy
with Doteasy $0 Web Hosting! Learn more at www.doteasy.com



More information about the mapserver-users mailing list