サーバー側からjavascript関数を呼び出しているところから2つのポイントがあります。
Public Sub FNLocationName(ByVal location As String)
System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, GetType(Page), "javascript", "SetMap('" & location & "')", True)
End Sub
Public Sub FNZoomLevel(ByVal IntZoomLevel As Integer)
System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, GetType(Page), "javascript", "zoomSet('" & IntZoomLevel & "')", True)
End Sub
しかし、これは私にエラーメッセージを与えています、undefined SetMap(locname)
私も試しました:
Public Sub FNLocationName(ByVal location As String)
Page.ClientScript.RegisterStartupScript(Me.GetType(), "MyScript", "javascript:SetMap('" & location & "')", True)
End Sub
Public Sub FNZoomLevel(ByVal IntZoomLevel As Integer)
Page.ClientScript.RegisterStartupScript(Me.GetType(), "MyScript", "javascript:zoomSet('" & IntZoomLevel & "')", True)
End Sub
ただし、このコードでは、SetMap
関数のみが呼び出され、ズームセットも呼び出される必要があります。
何が問題になる可能性があります。
私を助けてください。