更新 先生,这是我的网络page.I的当前代码根据乌拉圭回合的宝贵意见,但标题是不可见或不显示什么由我Assignig服务器端循环变量客户端阵列
<script runat=server>
Dim mgps As New Text.StringBuilder
Public ReadOnly Property GPS() As String
Get
Return mgps.ToString
End Get
End Property
Dim station As New Text.StringBuilder
Public ReadOnly Property STA() As String
Get
Return station.ToString
End Get
End Property
</script>
<% Dim con As New OleDbConnection
con = New OleDbConnection("Data Source=sml; User ID=sml; Password=sml; provider=OraOLEDB.Oracle")
con.Open()
Dim cmd As OleDbCommand = New OleDbCommand("Select STA_NAME, GPS_ONE from GPS", con)
Dim ds As New DataSet
Dim I As Long
Dim da As New OleDbDataAdapter(cmd)
da.Fill(ds, "GPS")
mgps.AppendLine("[")
For I = 0 To ds.Tables("GPS").Rows.Count - 1
' mgps.AppendLine("new google.maps.LatLng(" & ds.Tables("GPS").Rows(I).Item("GPS_ONE") & "),")
mgps.AppendLine("{GPS:new google.maps.LatLng(" & ds.Tables("GPS").Rows(I).Item("GPS_ONE") & "), Sta_Name:'" & STA & "'},")
Next I
mgps.AppendLine("];")
con.Close()
%>
错过所做的更改
UPDATE2 和JS代码是在这里
for(i=0; i<GPS.length; i++)
{
var image = 'ico/no.png';
var infowindow = new google.maps.InfoWindow();
var ContentString = GPS[i].TITLE
markers[i] = new google.maps.Marker(
{
position: GPS[i].GPS,
map: map,
draggable:true,
icon:image,
title:GPS[i].TITLE
});
google.maps.event.addListener(markers[i], 'click', function() {
infowindow.setContent(ContentString);
infowindow.open(map,markers[i]);
});
}
爵士我的信息窗口不开放什么可能的问题
GPS_ONE中的数据在您的GPS表中看起来像什么? – 2011-12-29 13:24:10
它看起来像这样30.302631872323,73.084871561209 – 2011-12-29 13:25:23
然后根据我的回答下面,它看起来像你缺少新的google.maps.LatLng(部分 – 2011-12-29 13:33:42