<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% Dim strPoly, strTemp, strID, intZoom, strframeSize, strCenter Function makeOutline(strPoly) strTemp = Replace(Replace(strPoly,"),(","},{"),", 4",",4") strTemp = Replace(Replace(strTemp,"(","{"),")","}") strTemp = Replace(Replace(strTemp,"{","{lat:"),"4.","lng:4.") makeOutline = strTemp End Function strID = CInt(Request.QueryString("id")) intZoom = 12 strframeSize = "width:325px; height:336px" strCenter = "lat: 52.132, lng: 4.339" strokeWeight = 1 If StrID = 0 Then ' de vogelaarswandeling intZoom = 14 strframeSize = "width:100%; height:100%" strCenter = "lat: 52.13525, lng: 4.33" strokeWeight = 2 End If Dim kavelRs Set kavelRs = Server.CreateObject("ADODB.Recordset") Set contourCmd = Server.CreateObject("ADODB.Command") contourCmd.ActiveConnection = adoCn contourCmd.CommandType = adCmdText contourCmd.CommandText = "SELECT kavelid, poly, kavelnummer FROM tblPoly WHERE kavelid = ?" contourCmd.Parameters.Append contourCmd.CreateParameter("id", adSmallInt, adParamInput, , strID) Set kavelRs = contourCmd.Execute() strKavel = kavelRs("kavelnummer") strContour = makeOutline(kavelRs("poly")) kavelRs.Close Set kavelRs = Nothing Dim meijendelRs Set meijendelRs = Server.CreateObject("ADODB.Recordset") Set outlineCmd = Server.CreateObject("ADODB.Command") outlineCmd.ActiveConnection = adoCn outlineCmd.CommandType = adCmdText outlineCmd.CommandText = "SELECT kavelid, poly FROM tblPoly WHERE kavelid = 80" Set meijendelRs = outlineCmd.Execute() tmpOutline = meijendelRs("poly") strTemp = "" ' van vorige omzetting strTemp = Replace(Replace(tmpOutline,"),(","},{"),", 4",",4") strTemp = Replace(Replace(strTemp,"(","{"),")","}") strMeijendel = Replace(Replace(strTemp,"{","{lat:"),"4.","lng:4.") meijendelRs.Close Set meijendelRs = Nothing %> Polylines kavel <%=strKavel%>