ASP with server-side scripting in map template

David Shorthouse dps1 at UALBERTA.CA
Thu Jun 16 13:20:28 EDT 2005


Ed,
 
    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 map file 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.
 
    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.
 
Thanks,
 
Dave


  _____  

From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Ed McNierney
Sent: Thursday, June 16, 2005 9:57 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] ASP with server-side scripting in map
template


David -
 
No, you can't do that.  Your Web server will run one processor/handler for
each page request.  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.  That's
double-dipping.
 
However, most of the MapServer template functionality allows you to do
pretty powerful things WITHOUT a scripting language.  If you've already got
a scripting language like ASP, you can just do those things in ASP.
 
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:
 
<img src="mapserv.exe?mode=scalebar&....">
 
where you'd like to insert the scalebar in the output HTML generated by your
ASP page.
 
     - Ed
 
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242 

  _____  

From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of David Shorthouse
Sent: Thursday, June 16, 2005 10:25 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] ASP with server-side scripting in map
template



Hey folks,
 
    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 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.
 
Thanks for any advice,
 
David

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050616/df55fe31/attachment.html


More information about the mapserver-users mailing list