|
-
Jun 22nd, 2000, 04:33 PM
#1
Thread Starter
Member
How do I retrieve for example :- [lat1],[lat2],[lat3],[lat4]
[lon1],[lon2],[lon3],[lon4]
from the following code below.
<% @Language = "VBScript" %>
<% Response.buffer = true %>
<%
Dim Msg
Dim Lat
Dim Lon
Dim Map
Msg = Maps & "," & Lon &"," & Lat
' Lat=Request.QueryString("Lat")
' Lon=Request.QueryString("Lon")
' Map=Request.QueryString("Map")
Map = "OS2000.map"
userid="1"
Lat = "50.75583"
Lon = "-1.537167"
'Lat = "90.8175"
'Lon = "-2.33"
Dim finalm
Set finalm = Server.CreateObject("DLLCall.Geomanconv")
RetStr=finalm.GEOMANCODE(Lat,Lon,Map)
Dim RetStr ' a variable to hold the original string value
Dim arrWork1 ' a variable to hold the split array of pairs
Dim arrWork2 ' a variable to hold the split array of name/value
Dim i ' a loop counter
' All the contents are in a string called RetStr
' The following code was added for testing purposes
' retStr = "Res=Map=OS2000.Map, MapO=2, Lat1=50.708286, " & _
' "Lat2=50.798220, " & vbcrlf & _
' "Lat3=50.797615, Lat4=50.707683, Lon1=-001.575082, " & _
' "Lon2=-001.574267, " & vbcrlf & _
' "Lon3=-001.432362, Lon4=-001.433449 , Page=7, XCur=14, " & _
' "YCur=45, Col= H, " & vbcrlf & _
' "Row= 5 , Page=12, XCur=14, YCur=45, Col= G, Row= 7"
' next, remove all of the carriage returns and line feeds
RetStr = Replace(RetStr, vbCrfl, "")
'split the string into an array at each comma
arrWork1 = Split(RetStr, ",")
For i = LBound(arrWork1) to UBound(arrWork1)
' split the current pair into name and value
' at the first equals sign...
arrWork2 = Split(arrWork1(i), "=", 2)
Response.Write "Name is [" & _
Trim(arrWork2(LBound(arrWork2))) & "]"
Response.Write ", Value is [" & _
Trim(arrWork2(UBound(arrWork2))) & "]<BR>"
Erase arrWork2 ' clear the array
Next
Erase arrWork1 ' clear the array
%>
'<%
'Sending the values to the gisdispatcher asp routine '
'<%
Dim Gis
Set Gis = Server.CreateObject("Gisdispatcher.Application")
Test = gis.gisdispatcher(Lat1,Lat2,Lat3,Lat4,Lon1,Lon2,Lon3,Lon4,XCur,YCur,Col,Row)
%>
<!-- <%="Res="&RetStr%>
-->
Name is [Map], Value is [OS2000.map]
Name is [MapO], Value is [1]
Name is [Lat1], Value is [50.708286]
Name is [Lat2], Value is [50.798220]
Name is [Lat3], Value is [50.797615]
Name is [Lat4], Value is [50.707683]
Name is [Lon1], Value is [-001.575082]
Name is [Lon2], Value is [-001.574267]
Name is [Lon3], Value is [-001.432362]
Name is [Lon4], Value is [-001.433449]
Name is [Page], Value is [7]
Name is [XCur], Value is [26]
Name is [YCur], Value is [53]
Name is [Col], Value is [H]
Name is [Row], Value is [5]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|