[Mapserver-users] Itasca Demo DHTML Help?
Chip Hankley
Chip.Hankley at rmtinc.com
Tue Jul 6 13:46:21 PDT 2004
Jerod -
FWIW, it's always a good idea to reply to the list as well, that way
the entire thread gets archived for others to use.
Here's some code from a template file of USGS 7.5' Quadrangles.
<script language="JavaScript">
var y = '[FILENA]';
var z = y.substring(0,6);
var w = window.open('','','resizable,status,width=625,height=400');
var x = w.document;
x.write("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01
Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>");
x.write("<html><head><title>[QUAD_NAME] Quadrangle</title>")
x.write("</body></html>");
</script>
I'm not sure about your other issues. I imagine that you are referring
to what's going on in the main frame. That page doesn't use the CGI
placeholders, rather all of the MS functionality is tied to a JavaScript
object. So, for instance, in the DHTML app that Steve Lime wrote, you
would access SCALE by refering to it as ms.scale from JavaScript.
Therefore, you will probably have to modify the links that you were
using before to be built on-the-fly using JavaScript.
HTH!
Chip
>>> Jerod Clabaugh <jclabaugh at mac.com> 07/06/04 03:18PM >>>
Chip:
>I make the query results frame size 0... as such, it's not visible on
>the screen.
>
>Then I use JavaScript to "pop-up" a new window with the query results
>in it. So, you're main template file for the layer being queried
would
>have some version of 'window.open' in it. This is generated in the
>'invisible' frame, which then opens a new window with the results in
it.
>I have used various techniques for writing the results... from using
>JavaScript to write the contents of the file out (document.write) to
>simply pointing the pop-up to a PHP page with a query string.
I hate to do this, but since you have already worked it out, is there
anyway you can send me snippets of the code to get the query results
frame to fire a popup window with query results in it.
I have zeroed the query frame out and it uses blank.html as its src.
Also, since switching my interface to DHTML, all my URL strings that
had cgi calls in them no longer work.
I had a URL string that would fire a page to show a printable copy of
the map, but the variable placeholders (e.g.,[img]) in the URL no
longer fill out from the cgi. Any ideas?
EX.
href="http://192.168.1.100/cgi-bin/mapserv?map_reference_status=on&mapsize=500
500&map=/Library/Apache2/htdocs/belize/demo.map&img=[img]&layer=[layers]&map_web_template=/Library/Apache2/htdocs/belize/print.html&mapext=[minx]+[miny]+[maxx]+[maxy]&map_web_imageurl=/tmp/"
And neither does the html variant way of building a legend. I used to
be able to use the [legend] placeholder to place a template that
would generate the legend in HTML on the fly, but it no longer works.
source:
[leg_layer_html order_metadata=WMS_ORDER visibility_flag=15]
[if name=WMS_SHOWINLEGEND oper=isnull]
<tr><td class="smtext"><u>[metadata name=WMS_TITLE]</u></td></tr>[/if]
[/leg_layer_html]
[leg_class_html visibility_flag=15]
<tr><td class="smtext"> <img src=[leg_icon]
align="absmiddle"> [leg_class_name]<br /></td></tr>[/leg_class_html]
Cheers,
Jerod
Outgoing messages, along with any attachments, are scanned for viruses at RMT prior to sending.
------------------------------------------------------------------------------
NOTICE--This email may contain confidential and privileged information
for the sole use of the intended recipient. Any review or distribution
by others is strictly prohibited. If you are not the intended recipient,
please contact the sender immediately and delete all copies.
More information about the MapServer-users
mailing list