replace MAP extension with ASPX or ASP
william paul
williampaul28 at YAHOO.COM
Fri Sep 29 06:10:51 PDT 2006
Tim:
Yes I want to build the map file on the fly using ASPX This way I can manage better some of the mapserver varibles
Thank you for your answer
William
"Pascoe,Tim [Burlington]" <Tim.Pascoe at ec.gc.ca> wrote:
v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} st1\:*{behavior:url(#default#ieooui) } William,
Im not sure, but think I know what is happening on the example you supplied, as I do the same thing. In order to suppress the path information normally visible in the browser address bar, the developer has implemented a simple ASP script which passes the mapserver arguments through. Below is the script I use, which I got from either this list, or one of the Mapserver support sites (cant remember, but Im not taking credit
.).
Hope this helps explain a bit, but I dont think it is actually what you want to do; I think you are looking to build the map file on the fly, correct?
<%
Server.ScriptTimeout = 360
Select Case Request.ServerVariables("REQUEST_METHOD")
Case "GET" strRequest = Request.QueryString
Case "POST" strRequest = Request.Form
End Select
strURL = "http://web.address/mapserv.exe?map=C:\path\to\mapfile\map.map&" & strRequest
Dim objHTTP
Set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
objHTTP.open "GET", strURL, false
objHTTP.send ""
Response.ContentType = objHTTP.getResponseHeader("content-type")
Response.BinaryWrite objHTTP.responseBody
Set objHTTP = Nothing
%>
Timothy Pascoe
Environmental Systems Scientist
Environment Canada / Environnement Canada
Canada Centre for Inland Waters / Centre Canadien des Eaux Intérieures
867 Lakeshore Road / 867, chemin Lakeshore
Burlington, Ontario / Burlington (Ontario)
L7R 4A6
Tel/Tél: (905) 336-6239
Fax/Téléc: (905) 336-4699
E-mail/C. élec: tim.pascoe at ec.gc.ca
Government of Canada/Gouvernement du Canada
This e-mail represents the opinions and views solely held by its author and in no manner may be considered as representing those of his/her employer.
---------------------------------
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of william paul
Sent: September 29, 2006 8:37 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] replace MAP extension with ASPX or ASP
Hello:
Is it possible to replace the map extension with aspx or asp? I have seen an example (http://www2.tetonwyo.org/mapserver/) where the map file is called map.asp. I tried to create an aspx file like:
<%Response.Write ("Map")%>.....and all the line for a map file, but when I try to replace the http://localhost/scripts/mapserv.exe?map=map.map.... with http://localhost/scripts/mapserv.exe?map=map.aspx I get an regualar expression error
I want to be use ASPX or ASP to create the lines code from a basic map file
Does anyone can give me an example?
Thank you
William
---------------------------------
Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.
---------------------------------
Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060929/66d809d6/attachment.htm>
More information about the MapServer-users
mailing list