<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2627" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=785272517-16062005><FONT face=Arial 
color=#0000ff size=2>Dave -</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=785272517-16062005><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=785272517-16062005><FONT face=Arial 
color=#0000ff size=2>I'm not sure why that needs to become "ugly" - as long as 
you can specify the map request via an HTTP GET request and querystring (and if 
you can use the CGI template mechanism you can, by definition, do that) you 
should be OK.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=785272517-16062005><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=785272517-16062005><FONT face=Arial 
color=#0000ff size=2>You can certainly have your ASP code make ONE request to 
the CGI program in "browse" mode and then - instead of returning the generated 
HTML to the client - capture the generated HTML and parse it.&nbsp; This can be 
very easy to do, since you simplify your template file to onlye be a list of 
MapServer template variables, one per line or something.&nbsp; You then just get 
a short text file returned to your ASP page with all the "answers" in it, 
including the URLs of any map images generated for you.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=785272517-16062005><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=785272517-16062005>&nbsp;&nbsp;&nbsp; <FONT 
face=Arial color=#0000ff size=2>- Ed</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=785272517-16062005>
<P><FONT size=2>Ed McNierney<BR>President and Chief Mapmaker<BR>TopoZone.com / 
Maps a la carte, Inc.<BR>73 Princeton Street, Suite 305<BR>North Chelmsford, 
MA&nbsp; 01863<BR>ed@topozone.com<BR>(978) 251-4242 </FONT></P></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> UMN MapServer Users List 
[mailto:MAPSERVER-USERS@LISTS.UMN.EDU] <B>On Behalf Of </B>David 
Shorthouse<BR><B>Sent:</B> Thursday, June 16, 2005 1:20 PM<BR><B>To:</B> 
MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Subject:</B> Re: [UMN_MAPSERVER-USERS] ASP 
with server-side scripting in map template<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=265011217-16062005><FONT 
face=Arial>Ed,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=265011217-16062005><FONT 
face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=265011217-16062005>&nbsp;&nbsp;&nbsp; <FONT 
face=Arial>Thanks for the suggestions. I now understand why it won't work as I 
had hoped. Your solution is probably the best for what I want to do but will get 
really ugly really fast. One layer in my&nbsp;map file&nbsp;comes as a result of 
a virtual connection to an Access db via an ovf file and DSN. I guess I'll just 
have to stick with what I have an be happy with it.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=265011217-16062005><FONT 
face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=265011217-16062005><FONT 
face=Arial>&nbsp;&nbsp;&nbsp; What I was attempting to do was not only pull some 
x and y coordinates from the Access db via the virtual connection but also pull 
the contents of a timestamp field from the same db. I suppose I could make a 
second layer and a second virtual connection. This however, might be a drain on 
my server with every pan and zoom the client performs.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=265011217-16062005><FONT 
face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=265011217-16062005><FONT 
face=Arial>Thanks,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=265011217-16062005><FONT 
face=Arial></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=265011217-16062005><FONT 
face=Arial>Dave</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> UMN MapServer Users List 
  [mailto:MAPSERVER-USERS@LISTS.UMN.EDU] <B>On Behalf Of </B>Ed 
  McNierney<BR><B>Sent:</B> Thursday, June 16, 2005 9:57 AM<BR><B>To:</B> 
  MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Subject:</B> Re: [UMN_MAPSERVER-USERS] ASP 
  with server-side scripting in map template<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV dir=ltr align=left><SPAN class=012365215-16062005><FONT face=Arial 
  color=#0000ff size=2>David -</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=012365215-16062005><FONT face=Arial 
  color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV dir=ltr align=left><SPAN class=012365215-16062005><FONT face=Arial 
  color=#0000ff size=2>No, you can't do that.&nbsp; Your Web server will run one 
  processor/handler for each page request.&nbsp; You're essentially trying to 
  send *one* HTTP request to a CGI program, and then have the ASP output of that 
  program treated as if it were an ASP source page, and run through the ASP 
  processor.&nbsp; That's double-dipping.</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=012365215-16062005><FONT face=Arial 
  color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV dir=ltr align=left><SPAN class=012365215-16062005><FONT face=Arial 
  color=#0000ff size=2>However, most of the MapServer template functionality 
  allows you to do pretty powerful things WITHOUT a scripting language.&nbsp; If 
  you've already got a scripting language like ASP, you can just do those things 
  in ASP.</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=012365215-16062005><FONT face=Arial 
  color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV dir=ltr align=left><SPAN class=012365215-16062005><FONT face=Arial 
  color=#0000ff size=2>The easiest way (IMHO) to do this is to have your ASP 
  code generate the "template" output, and insert the appropriate IMG tags with 
  SRC properties specifying MapServer CGI requests, like:</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=012365215-16062005><FONT face=Arial 
  color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV dir=ltr align=left><SPAN class=012365215-16062005><FONT face=Arial 
  color=#0000ff size=2>&lt;img 
  src="mapserv.exe?mode=scalebar&amp;...."&gt;</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=012365215-16062005><FONT face=Arial 
  color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV dir=ltr align=left><SPAN class=012365215-16062005><FONT face=Arial 
  color=#0000ff size=2>where you'd like to insert the scalebar in the output 
  HTML generated by your ASP page.</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=012365215-16062005><FONT face=Arial 
  color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
  <DIV dir=ltr align=left><SPAN class=012365215-16062005><FONT face=Arial 
  color=#0000ff size=2>&nbsp;&nbsp;&nbsp;&nbsp; - Ed</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=012365215-16062005><FONT face=Arial 
  color=#0000ff size=2><FONT size=2></FONT></FONT></SPAN>&nbsp;</DIV>
  <DIV dir=ltr align=left><SPAN class=012365215-16062005><FONT face=Arial 
  color=#0000ff size=2><FONT size=2>Ed McNierney<BR>President and Chief 
  Mapmaker<BR>TopoZone.com / Maps a la carte, Inc.<BR>73 Princeton Street, Suite 
  305<BR>North Chelmsford, MA&nbsp; 01863<BR>ed@topozone.com<BR>(978) 251-4242 
  </FONT></DIV></FONT></SPAN><BR>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> UMN MapServer Users List 
  [mailto:MAPSERVER-USERS@LISTS.UMN.EDU] <B>On Behalf Of </B>David 
  Shorthouse<BR><B>Sent:</B> Thursday, June 16, 2005 10:25 AM<BR><B>To:</B> 
  MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Subject:</B> [UMN_MAPSERVER-USERS] ASP 
  with server-side scripting in map template<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV><FONT face=Arial>
  <DIV><SPAN class=571461314-16062005><FONT face=Arial>Hey 
  folks,</FONT></SPAN></DIV>
  <DIV><SPAN class=571461314-16062005><FONT 
face=Arial></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=571461314-16062005>&nbsp;&nbsp;&nbsp; <FONT face=Arial>Is it 
  possible to include server-side vbscript on a map template? MapServer can use 
  .asp as a map template, but nothing is done with the scripting I tried to 
  include. In fact, if you look at the source of the resultant page, 
  the&nbsp;vbscript is clearly visible. My problem is that I'm stuck with asp 
  and there are a few things I would like to add to the map template that would 
  be more efficient to do via vbscript than a MapServer 
  layer.</FONT></SPAN></DIV>
  <DIV><SPAN class=571461314-16062005><FONT 
face=Arial></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=571461314-16062005><FONT face=Arial>Thanks for any 
  advice,</FONT></SPAN></DIV>
  <DIV><SPAN class=571461314-16062005><FONT 
face=Arial></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=571461314-16062005><FONT 
  face=Arial>David</FONT></SPAN></DIV></FONT></DIV></BLOCKQUOTE></BODY></HTML>