JSON via ASMX webservice to RadCLientDataSource - Data not mapped on RadMap

2 posts, 0 answers
  1. Glen
    Glen avatar
    11 posts
    Member since:
    Oct 2010

    Posted 21 Nov 2014 Link to this post

    I am using an asmx webservice to serve up JSON mapping data to the RadCLientDataSource, then binding in MapLayer, yet I am having no success in getting the control to plot the markers.  I have tested the basics like is it serving up a staic JSON (using the demo JSON files) and this works. (So not an issue with the web.config file).  I have also confirmed using Fiddler that the JSON file is being served up correctly (it is correctly parsed in the JSON tab of fiddler, and I have no d schema requirements). So as far as I can see have a clean structured, zero error, JSON file being sent to the browser.

    I have then set the LocationField='Location' in the maplayer where Location is the JSON filed and this is an array of Latitude/Longitude values.  Therefore I am stumped, as there are no examples of serving the mapping file via a webservice I wondering if it simply does not work.  Any thoughts please, or any suggestions how I can debug why the data is not being mapped ?

    As stated it works fine with a static file - but when using asmx file I cannot get it to work.

    Here is the RadClientDataSource code
    <telerik:RadClientDataSource runat="server" ID="RadClientDataSourceCustomers">
                <Select DataType="JSON" Url="http://localhost:62671/Customers.asmx/GetCustomers?iCountry=6"  ContentType="application/json; charset=utf-8" RequestType="Get" />

    Here is the MapLayer code
        <telerik:MapLayer Type="Marker" Shape="pin" ClientDataSourceID="RadClientDataSourceCustomers" LocationField="Location">
        <TooltipSettings AutoHide="false" Width="300"
                         Template="<div class='COntainer'><div class='cusName'>#= marker.dataItem.CustomerName #</div></div>">
                <OpenSettings Duration="300" Effects="fade:in" />
                <CloseSettings Duration="200" Effects="fade:out" />

    Any thoughts or examples would be useful.
  2. Glen
    Glen avatar
    11 posts
    Member since:
    Oct 2010

    Posted 24 Nov 2014 in reply to Glen Link to this post

    Fixed.  Basically by not using asmx but switched to Web API to return JSON, despite following numerous blogs on how to get the JSON file sent, I could never get it 'perfect' so rad map was always ignoring the dataset.
  3. Telerik UI for ASP.NET Core is out
Back to Top