The ASMX web service below returns a file that when saved and referenced in the RadClientDataSource displays correct on my RadMap. However all attempts to point the RadClientDataSource directly at the web service result in no data being displayed on the RadMap.
Please help
Imports System
Imports System.Web
Imports System.Collections
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.Script.Serialization
Imports System.Web.Script.Services
Imports System.ComponentModel
' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
' <System.Web.Script.Services.ScriptService()> _
<System.Web.Services.WebService(Namespace:="d")> _
<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<ToolboxItem(False)> _
Public Class SQLdataWH
Inherits System.Web.Services.WebService
<WebMethod()> _
<ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
Public Function getPBayMachinePopulation() As String
Dim sqlConnection As SqlConnection = New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("BKDataWarehouseConnectionString").ConnectionString)
sqlConnection.Open()
Dim sqlCommand As SqlCommand = New SqlCommand("SELECT * FROM [BKDataWarehouse].[dbo].[uvw_PBAY_MachineLocationSummary]", sqlConnection)
Dim sqlDataset As DataSet = New DataSet()
Dim sqlDataAdapter As SqlDataAdapter = New SqlDataAdapter(sqlCommand)
sqlDataAdapter.Fill(sqlDataset)
sqlConnection.Close()
'Dim MArray()() As String = New String(sqlDataset.Tables(0).Rows.Count - 1)() {}
Dim MArray(sqlDataset.Tables(0).Rows.Count - 1) As JSON_results
Dim i As Integer = 0
For Each rs As DataRow In sqlDataset.Tables(0).Rows
'MArray(i) = New String() {rs("Location").ToString(), rs("Population").ToString()}
MArray(i) = New JSON_results
MArray(i).City = rs("City")
MArray(i).Country = rs("Country")
MArray(i).Pop2010 = rs("Population")
MArray(i).Location(0) = rs("LATITUDE")
MArray(i).Location(1) = rs("LONGITUDE")
i = i + 1
Next
Dim js As JavaScriptSerializer = New JavaScriptSerializer()
Dim sJSON As String = js.Serialize(MArray)
Return sJSON
End Function
Public Class JSON_results
Private PoplationValue As Double
Private CityValue As String
Private CountryValue As String
Private LocationValue(1) As Double
Property Pop2010() As Double
Get
Return PoplationValue
End Get
Set(ByVal Value As Double)
PoplationValue = Value
End Set
End Property
Property City() As String
Get
Return CityValue
End Get
Set(ByVal Value As String)
CityValue = Value
End Set
End Property
Property Country() As String
Get
Return CountryValue
End Get
Set(ByVal Value As String)
CountryValue = Value
End Set
End Property
Property Location() As Double()
Get
Return LocationValue
End Get
Set(ByVal Value As Double())
LocationValue = Value
End Set
End Property
End Class
'Public Class LocationType
' Private LatitudeValue As Double
' Private LongitudeValue As Double
' Property Latitude() As Double
' Get
' Return LatitudeValue
' End Get
' Set(ByVal Value As Double)
' LatitudeValue = Value
' End Set
' End Property
' Property Longitude() As Double
' Get
' Return LongitudeValue
' End Get
' Set(ByVal Value As Double)
' LongitudeValue = Value
' End Set
' End Property
'End Class
End Class