日期:2014-05-17 浏览次数:20478 次
OracleDataReader odr = cmd.ExecuteReader(); int count = 0; while (odr.Read()) { Longitudes[count] = System.Double.Parse(odr["x"].ToString()); longitude += Longitudes[count] + "|";//将读取的经纬度存储为字符串形式 Latitudes[count] = System.Double.Parse(odr["y"].ToString()); latitude += Latitudes[count] + "|"; Custids[count] =Convert.ToInt16(odr["custid"]); custid += Custids[count] + "|"; username += odr["username"].ToString() + "|"; address += odr["address"].ToString() + "|"; time += odr["starttime"].ToString() + "|"; count = count + 1; }
function secRing(){ map.clearOverlays(); var array1 = "<%=longitude%>"; var array2 = "<%=latitude %>"; var array3="<%=username%>"; var array4="<%=address %>"; var array5="<%=time %>"; var pointX = array1.split('|'); var pointY = array2.split('|'); var title = array3.split('|'); var content = array4.split('|'); var time = array5.split('|'); alert(time); var count = pointX.length; var JsonType=getJson(title,content,pointX,pointY); } function getJson(arr1,arr2,arr3,arr4){ var _json = new Array(); for(i=0;i<arr1.length;i++) { _json.push({"title":arr1[i],"content":arr2[i],"point":arr3[i]+"|"+arr4[i]}); } alert(_json); return _json; }