日期:2014-05-16 浏览次数:20956 次
<%
sql = "select * from dat"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
rs.movefirst
i=0
Do While Not rs.Eof
%>
if (nzoom >= <%=rs("Min_zoom")%> && nzoom <= <%=rs("Max_zoom")%>)
{
<%
Response.Write "var marker" & i & " = new BMap.Marker(point[" & i & "],{icon:myIcon" & rs("dtype") & "});"& Ent
i = i +1
%>
}
<%
rs.MoveNext
Loop
%>
<%
dim str
sql = "select * from dat"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
rs.movefirst
Do While Not rs.Eof
str=str&"
------解决方案--------------------
"&rs("Min_zoom")&":"&rs("Max_zoom")&":"&rs("dtype")
rs.MoveNext
Loop
%>
<script type="text/javascript">
var nzoom=123;//你自己的变量
var str="<%=mid(str,2)%>";
var arr=str.split("
------解决方案--------------------
");
var a,n=0;
for(var i=0;i<arr.length;i++){
a=arr[i].split(":");
if(nzoom>=a[0]&&nzoom<=a[1]){
window["marker"+n]=new BMap.Marker(point[n],{icon:"myIcon"+a[2]});
n++;
}
}
</script>