This is a migrated thread and some comments may be shown as answers.

Load layer from datatable

5 Answers 139 Views
Map
This is a migrated thread and some comments may be shown as answers.
Yana
Top achievements
Rank 1
Veteran
Yana asked on 12 Jul 2019, 06:34 PM

Hi,

Currently i create maps by linking json file to the layer. In my understanding there is a way to provide some kind of an object as a datasource to the layer.

Can you provide example, please?

5 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 16 Jul 2019, 12:40 PM
Hi Yana,

Currently, RadMap does not support binding GeoJSON data from server-side and the only way is through the RadClientDataSource control or through the API on client-side.

Having that in mind, once you retrieve the data on server-side you could save it in a HiddenField control for example and on client-side, using the RadMap API you can manually bind the shapes. Following is a simple implementation of that approach:
<script type="text/javascript">
    function OnInitialize(sender, args) {
        var originalOptions = args.get_options();
        var geoJSON = document.getElementById("<%=HiddenGeoJSON.ClientID%>").value;
        originalOptions.layers[0].dataSource = { data: JSON.parse(geoJSON) };
        args.set_options(originalOptions);
    }
</script>
 
<asp:HiddenField runat="server" ID="HiddenGeoJSON" />
 
<telerik:RadMap runat="server" ID="RadMap1" Zoom="2" Width="500" Height="200">
    <ClientEvents OnInitialize="OnInitialize" />
    <CenterSettings Latitude="30" Longitude="10" />
    <LayerDefaultsSettings>
        <ShapeSettings>
            <StyleSettings>
                <FillSettings Color="green" />
                <StrokeSettings Color="black" Width="2" />
            </StyleSettings>
        </ShapeSettings>
    </LayerDefaultsSettings>
    <LayersCollection>
        <telerik:MapLayer Type="Shape">
        </telerik:MapLayer>
    </LayersCollection>
</telerik:RadMap>

And the code-behind:
protected void Page_Load(object sender, EventArgs e)
{
    HiddenGeoJSON.Value = "[{\"type\": \"Polygon\",\"coordinates\": [[[30, 10], [40, 40], [20, 40], [10, 20], [30, 10]]]}]";
}



The following examples

Getting Started with Client-side Data Binding
Map - Cross-Layer Integration

show how to bind a shapes layer to a data source. Client-side data source is the only supported type at the moment.

Thus, you can consider creating the json files with server code depending on the information in the database. Or, use pure client-side binding and create a webservice that will return the geoJSON objects. 

Best Regards,

Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Yana
Top achievements
Rank 1
Veteran
answered on 17 Jul 2019, 08:00 PM
Thank you Rumen, i'll try to figure it out
0
Rumen
Telerik team
answered on 18 Jul 2019, 06:05 AM

You are welcome, Yana!

Keep up the good work.

Regards, Rumen
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Yana
Top achievements
Rank 1
Veteran
answered on 12 Oct 2020, 01:34 PM

Hi Rumen,

   The following example is loading file through file, but failes to load way we discussed.

   What is wrong?

   HiddenGeoJSON.Value = "{""type"":""FeatureCollection"",""crs"": { ""type"": ""name"", ""properties"": { ""name"": ""urn:ogc:def:crs:OGC:1.3:CRS84"" } },""features"":[{ ""type"": ""Feature"", ""properties"": { ""name"": ""Middlesex County, MA"",  ""vfreight_c"": ""25017"", ""color"": ""#948A54"",""longitude"": -71.3949166, ""dollars"": 0.000000, ""in_region"": 0 }, ""geometry"": { ""type"": ""MultiPolygon"", ""coordinates"": [ [ [ [ -71.898716, 42.71142 ], [ -71.745817, 42.707287 ], [ -71.636214, 42.704888 ], [ -71.631814, 42.704788 ], [ -71.542533, 42.702672 ], [ -71.351874, 42.698154 ], [ -71.330206, 42.69719 ], [ -71.294205, 42.69699 ], [ -71.278929, 42.711258 ], [ -71.267905, 42.72589 ], [ -71.255605, 42.736389 ], [ -71.25518, 42.73665 ], [ -71.238103, 42.669491 ], [ -71.256103, 42.656691 ], [ -71.172108, 42.616751 ], [ -71.165015, 42.597959 ], [ -71.158617, 42.612948 ], [ -71.13529, 42.599061 ], [ -71.076133, 42.604077 ], [ -71.058772, 42.608996 ], [ -71.028312, 42.574082 ], [ -71.057164, 42.574151 ], [ -71.070978, 42.555889 ], [ -71.075257, 42.531122 ], [ -71.040983, 42.526262 ], [ -71.035296, 42.506995 ], [ -71.053496, 42.475895 ], [ -71.025777, 42.444753 ], [ -71.020377, 42.43825 ], [ -71.033203, 42.414226 ], [ -71.055295, 42.387097 ], [ -71.073496, 42.391796 ], [ -71.080595, 42.380997 ], [ -71.064095, 42.368997 ], [ -71.069795, 42.369097 ], [ -71.077095, 42.358697 ], [ -71.099196, 42.352797 ], [ -71.117099, 42.355594 ], [ -71.117197, 42.367197 ], [ -71.130997, 42.373796 ], [ -71.143501, 42.364969 ], [ -71.148565, 42.361174 ], [ -71.167625, 42.360073 ], [ -71.174798, 42.350265 ], [ -71.156833, 42.330189 ], [ -71.178935, 42.314316 ], [ -71.164804, 42.303764 ], [ -71.178636, 42.294595 ], [ -71.191155, 42.283059 ], [ -71.227689, 42.315473 ], [ -71.23106, 42.320736 ], [ -71.2475, 42.321486 ], [ -71.269919, 42.328096 ], [ -71.32975, 42.312991 ], [ -71.302922, 42.248274 ], [ -71.332434, 42.247729 ], [ -71.338435, 42.215232 ], [ -71.34417, 42.200703 ], [ -71.384756, 42.192033 ], [ -71.40222, 42.178798 ], [ -71.444067, 42.174889 ], [ -71.478119, 42.156782 ], [ -71.497378, 42.166643 ], [ -71.502626, 42.191416 ], [ -71.58291, 42.195559 ], [ -71.599318, 42.225959 ], [ -71.586759, 42.259545 ], [ -71.562194, 42.267651 ], [ -71.513048, 42.267148 ], [ -71.497046, 42.289829 ], [ -71.486768, 42.330075 ], [ -71.551126, 42.326395 ], [ -71.585168, 42.310977 ], [ -71.624702, 42.350465 ], [ -71.610007, 42.357403 ], [ -71.603187, 42.367329 ], [ -71.580043, 42.386949 ], [ -71.604251, 42.397703 ], [ -71.559046, 42.411981 ], [ -71.543297, 42.466451 ], [ -71.560367, 42.47435 ], [ -71.531476, 42.520487 ], [ -71.538949, 42.543069 ], [ -71.580287, 42.550467 ], [ -71.594643, 42.54337 ], [ -71.620039, 42.55245 ], [ -71.636079, 42.539924 ], [ -71.635812, 42.524091 ], [ -71.67898, 42.530351 ], [ -71.67773, 42.539397 ], [ -71.664614, 42.611589 ], [ -71.775742, 42.644216 ], [ -71.775322, 42.636663 ], [ -71.844843, 42.637985 ], [ -71.85841, 42.63384 ], [ -71.85782, 42.674987 ], [ -71.897089, 42.703826 ], [ -71.898716, 42.71142 ] ] ] ] } },{ ""type"": ""Feature"", ""properties"": { ""name"": ""Norfolk County, MA"",  ""vfreight_c"": ""25021"", ""color"": ""#948A54"",""longitude"": -71.1798747, ""dollars"": 0.000000, ""in_region"": 0 }, ""geometry"": { ""type"": ""MultiPolygon"", ""coordinates"": [ [ [ [ -70.780722, 42.251792 ], [ -70.785081, 42.225276 ], [ -70.826933, 42.200678 ], [ -70.85338, 42.239607 ], [ -70.844614, 42.260512 ], [ -70.824661, 42.265935 ], [ -70.811742, 42.262935 ], [ -70.788724, 42.25392 ], [ -70.780722, 42.251792 ] ] ], [ [ [ -71.156833, 42.330189 ], [ -71.122423, 42.351811 ], [ -71.10657, 42.349912 ], [ -71.116608, 42.32395 ], [ -71.126999, 42.318615 ], [ -71.152195, 42.294597 ], [ -71.164804, 42.303764 ], [ -71.178935, 42.314316 ], [ -71.156833, 42.330189 ] ] ], [ [ [ -71.381466, 41.984998 ], [ -71.381401, 42.018798 ], [ -71.458104, 42.017762 ], [ -71.498258, 42.01722 ], [ -71.50091, 42.117041 ], [ -71.478521, 42.131421 ], [ -71.478119, 42.156782 ], [ -71.444067, 42.174889 ], [ -71.40222, 42.178798 ], [ -71.384756, 42.192033 ], [ -71.34417, 42.200703 ], [ -71.338435, 42.215232 ], [ -71.332434, 42.247729 ], [ -71.302922, 42.248274 ], [ -71.32975, 42.312991 ], [ -71.269919, 42.328096 ], [ -71.2475, 42.321486 ], [ -71.23106, 42.320736 ], [ -71.227689, 42.315473 ], [ -71.191155, 42.283059 ], [ -71.130808, 42.22788 ], [ -71.112938, 42.258641 ], [ -71.074894, 42.270303 ], [ -71.042794, 42.276998 ], [ -71.041594, 42.278098 ], [ -71.040494, 42.281898 ], [ -71.03908, 42.283966 ], [ -71.035294, 42.288798 ], [ -71.041694, 42.305298 ], [ -71.005399, 42.307196 ], [ -71.000948, 42.302483 ], [ -71.006158, 42.28811 ], [ -71.0049, 42.28272 ], [ -70.996097, 42.271222 ], [ -70.98909, 42.267449 ], [ -70.967351, 42.268168 ], [ -70.948971, 42.272505 ], [ -70.945547, 42.269081 ], [ -70.935886, 42.264189 ], [ -70.923169, 42.263211 ], [ -70.910941, 42.265412 ], [ -70.906302, 42.271636 ], [ -70.917081, 42.2556 ], [ -70.932435, 42.252644 ], [ -70.91485, 42.224408 ], [ -70.924877, 42.15758 ], [ -70.981293, 42.135502 ], [ -70.993114, 42.130855 ], [ -71.002029, 42.126506 ], [ -71.080192, 42.095699 ], [ -71.138619, 42.072813 ], [ -71.168681, 42.061161 ], [ -71.288265, 42.014462 ], [ -71.288265, 42.014451 ], [ -71.288263, 42.014379 ], [ -71.364887, 41.985173 ], [ -71.381466, 41.984998 ] ] ] ] } },{ ""type"": ""Feature"", ""properties"": { ""name"": ""Suffolk County, MA"",  ""vfreight_c"": ""25025"", ""color"": ""#948A54"",""longitude"": -71.0201725, ""dollars"": 0.000000, ""in_region"": 0 }, ""geometry"": { ""type"": ""MultiPolygon"", ""coordinates"": [ [ [ [ -71.042794, 42.276998 ], [ -71.074894, 42.270303 ], [ -71.112938, 42.258641 ], [ -71.130808, 42.22788 ], [ -71.191155, 42.283059 ], [ -71.178636, 42.294595 ], [ -71.164804, 42.303764 ], [ -71.152195, 42.294597 ], [ -71.126999, 42.318615 ], [ -71.116608, 42.32395 ], [ -71.10657, 42.349912 ], [ -71.122423, 42.351811 ], [ -71.156833, 42.330189 ], [ -71.174798, 42.350265 ], [ -71.167625, 42.360073 ], [ -71.148565, 42.361174 ], [ -71.143501, 42.364969 ], [ -71.130997, 42.373796 ], [ -71.117197, 42.367197 ], [ -71.117099, 42.355594 ], [ -71.099196, 42.352797 ], [ -71.077095, 42.358697 ], [ -71.069795, 42.369097 ], [ -71.064095, 42.368997 ], [ -71.080595, 42.380997 ], [ -71.073496, 42.391796 ], [ -71.055295, 42.387097 ], [ -71.033203, 42.414226 ], [ -71.020377, 42.43825 ], [ -71.025777, 42.444753 ], [ -70.982294, 42.431296 ], [ -70.960647, 42.443787 ], [ -70.960835, 42.441272 ], [ -70.982994, 42.423996 ], [ -70.987694, 42.416696 ], [ -70.990595, 42.407098 ], [ -70.989195, 42.402598 ], [ -70.985068, 42.402041 ], [ -70.983426, 42.396246 ], [ -70.980336, 42.391513 ], [ -70.972706, 42.389968 ], [ -70.970195, 42.388036 ], [ -70.97174, 42.387071 ], [ -70.972513, 42.385042 ], [ -70.972706, 42.381759 ], [ -70.972223, 42.377316 ], [ -70.960798, 42.360648 ], [ -70.953292, 42.349698 ], [ -70.953022, 42.343973 ], [ -70.963578, 42.34686 ], [ -70.972418, 42.353875 ], [ -70.974897, 42.355843 ], [ -70.979927, 42.356382 ], [ -70.982282, 42.35592 ], [ -70.998253, 42.352788 ], [ -71.006877, 42.347039 ], [ -71.010146, 42.339234 ], [ -71.011804, 42.335274 ], [ -71.01568, 42.326019 ], [ -71.013165, 42.315419 ], [ -71.005399, 42.307196 ], [ -71.041694, 42.305298 ], [ -71.035294, 42.288798 ], [ -71.03908, 42.283966 ], [ -71.040494, 42.281898 ], [ -71.041594, 42.278098 ], [ -71.042794, 42.276998 ] ] ] ] } },{ ""type"": ""Feature"", ""properties"": { ""name"": ""Plymouth County, MA"",  ""vfreight_c"": ""25023"", ""color"": ""#948A54"",""longitude"": -70.7419417, ""dollars"": 0.000000, ""in_region"": 0 }, ""geometry"": { ""type"": ""MultiPolygon"", ""coordinates"": [ [ [ [ -70.981293, 42.135502 ], [ -70.924877, 42.15758 ], [ -70.91485, 42.224408 ], [ -70.932435, 42.252644 ], [ -70.917081, 42.2556 ], [ -70.906302, 42.271636 ], [ -70.896267, 42.2851 ], [ -70.895778, 42.292436 ], [ -70.897123, 42.29586 ], [ -70.915588, 42.302463 ], [ -70.91749, 42.305686 ], [ -70.907556, 42.307889 ], [ -70.882764, 42.30886 ], [ -70.881242, 42.300663 ], [ -70.870873, 42.285668 ], [ -70.861807, 42.275965 ], [ -70.851093, 42.26827 ], [ -70.831075, 42.267424 ], [ -70.824661, 42.265935 ], [ -70.844614, 42.260512 ], [ -70.85338, 42.239607 ], [ -70.826933, 42.200678 ], [ -70.785081, 42.225276 ], [ -70.780722, 42.251792 ], [ -70.770964, 42.249197 ], [ -70.764757, 42.244062 ], [ -70.754488, 42.228673 ], [ -70.74723, 42.221816 ], [ -70.73056, 42.21094 ], [ -70.722269, 42.207959 ], [ -70.718707, 42.184853 ], [ -70.714301, 42.168783 ], [ -70.706264, 42.163137 ], [ -70.685315, 42.133025 ], [ -70.663931, 42.108336 ], [ -70.640169, 42.088633 ], [ -70.63848, 42.081579 ], [ -70.647349, 42.076331 ], [ -70.64819, 42.068441 ], [ -70.643208, 42.050821 ], [ -70.644337, 42.045895 ], [ -70.650874, 42.046247 ], [ -70.66936, 42.037116 ], [ -70.671666, 42.02139 ], [ -70.667512, 42.01232 ], [ -70.670934, 42.007786 ], [ -70.678798, 42.00551 ], [ -70.686798, 42.012764 ], [ -70.695809, 42.013346 ], [ -70.712204, 42.007586 ], [ -70.710034, 41.999544 ], [ -70.698981, 41.987103 ], [ -70.662476, 41.960592 ], [ -70.651673, 41.958701 ], [ -70.648365, 41.961672 ], [ -70.631251, 41.950475 ], [ -70.623513, 41.943273 ], [ -70.616491, 41.940204 ], [ -70.608166, 41.940701 ], [ -70.598078, 41.947772 ], [ -70.583572, 41.950007 ], [ -70.552941, 41.929641 ], [ -70.546386, 41.916751 ], [ -70.54741, 41.911934 ], [ -70.545949, 41.907158 ], [ -70.532084, 41.889568 ], [ -70.525567, 41.85873 ], [ -70.535487, 41.839381 ], [ -70.542065, 41.831263 ], [ -70.543168, 41.824446 ], [ -70.54103, 41.815754 ], [ -70.537289, 41.810859 ], [ -70.565281, 41.786705 ], [ -70.632578, 41.762821 ], [ -70.621622, 41.748972 ], [ -70.642914, 41.71841 ], [ -70.644641, 41.71898 ], [ -70.651093, 41.715715 ], [ -70.656596, 41.715401 ], [ -70.670453, 41.721912 ], [ -70.708193, 41.730959 ], [ -70.718739, 41.73574 ], [ -70.726331, 41.732731 ], [ -70.728933, 41.723433 ], [ -70.721302, 41.712968 ], [ -70.717451, 41.69398 ], [ -70.719575, 41.685002 ], [ -70.729395, 41.68814 ], [ -70.744396, 41.696967 ], [ -70.755347, 41.694326 ], [ -70.761481, 41.676808 ], [ -70.76236, 41.667735 ], [ -70.758198, 41.661225 ], [ -70.757622, 41.654265 ], [ -70.765463, 41.641575 ], [ -70.769318, 41.641145 ], [ -70.773654, 41.645033 ], [ -70.775798, 41.649145 ], [ -70.776709, 41.650756 ], [ -70.809118, 41.656437 ], [ -70.813286, 41.65567 ], [ -70.815729, 41.652796 ], [ -70.816351, 41.645995 ], [ -70.804664, 41.641157 ], [ -70.800215, 41.631753 ], [ -70.801063, 41.629513 ], [ -70.810279, 41.624873 ], [ -70.835296, 41.624532 ], [ -70.843177, 41.628487 ], [ -70.845242, 41.644665 ], [ -70.886439, 41.760232 ], [ -70.904438, 41.758 ], [ -70.921782, 41.791244 ], [ -71.026288, 41.778888 ], [ -71.014494, 41.799382 ], [ -71.03657, 41.816525 ], [ -70.973717, 41.860879 ], [ -70.999705, 41.929592 ], [ -71.049498, 41.96315 ], [ -71.054718, 41.985057 ], [ -71.080192, 42.095699 ], [ -71.002029, 42.126506 ], [ -70.993114, 42.130855 ], [ -70.981293, 42.135502 ] ] ] ] } },{ ""type"": ""Feature"", ""properties"": { ""name"": ""Essex County, MA"",  ""vfreight_c"": ""25009"", ""color"": ""#948A54"",""longitude"": -70.8651073, ""dollars"": 0.000000, ""in_region"": 0 }, ""geometry"": { ""type"": ""MultiPolygon"", ""coordinates"": [ [ [ [ -71.245504, 42.742589 ], [ -71.233404, 42.745489 ], [ -71.223904, 42.746689 ], [ -71.208302, 42.743314 ], [ -71.208227, 42.743294 ], [ -71.208137, 42.743273 ], [ -71.181803, 42.73759 ], [ -71.186104, 42.790689 ], [ -71.174403, 42.801589 ], [ -71.167703, 42.807389 ], [ -71.165603, 42.808689 ], [ -71.149703, 42.815489 ], [ -71.132503, 42.821389 ], [ -71.116048, 42.817751 ], [ -71.064201, 42.806289 ], [ -71.053601, 42.833089 ], [ -71.047501, 42.844089 ], [ -71.044401, 42.848789 ], [ -71.031201, 42.859089 ], [ -70.9665, 42.868989 ], [ -70.949199, 42.876089 ], [ -70.931699, 42.884189 ], [ -70.930799, 42.884589 ], [ -70.927629, 42.885326 ], [ -70.914899, 42.886589 ], [ -70.914886, 42.886564 ], [ -70.902768, 42.88653 ], [ -70.886136, 42.88261 ], [ -70.848625, 42.860939 ], [ -70.837376, 42.864996 ], [ -70.830795, 42.868918 ], [ -70.821769, 42.87188 ], [ -70.817296, 42.87229 ], [ -70.817731, 42.850613 ], [ -70.80522, 42.781798 ], [ -70.792867, 42.747118 ], [ -70.772267, 42.711064 ], [ -70.770453, 42.704824 ], [ -70.778552, 42.69852 ], [ -70.778671, 42.693622 ], [ -70.764421, 42.68565 ], [ -70.748752, 42.683878 ], [ -70.744427, 42.682092 ], [ -70.72982, 42.669602 ], [ -70.728845, 42.663877 ], [ -70.689402, 42.653319 ], [ -70.682594, 42.654525 ], [ -70.681594, 42.662342 ], [ -70.663548, 42.677603 ], [ -70.645101, 42.689423 ], [ -70.630077, 42.692699 ], [ -70.620031, 42.688006 ], [ -70.622864, 42.67599 ], [ -70.623815, 42.665481 ], [ -70.622791, 42.660873 ], [ -70.61482, 42.65765 ], [ -70.595474, 42.660336 ], [ -70.591742, 42.648508 ], [ -70.591469, 42.639821 ], [ -70.594014, 42.63503 ], [ -70.605611, 42.634898 ], [ -70.61842, 42.62864 ], [ -70.635635, 42.600243 ], [ -70.654727, 42.582234 ], [ -70.664887, 42.580436 ], [ -70.668022, 42.581732 ], [ -70.668115, 42.585361 ], [ -70.668488, 42.589643 ], [ -70.670442, 42.592249 ], [ -70.672583, 42.594296 ], [ -70.675747, 42.594669 ], [ -70.678819, 42.594389 ], [ -70.681428, 42.593173 ], [ -70.684502, 42.588858 ], [ -70.698574, 42.577393 ], [ -70.729688, 42.57151 ], [ -70.737044, 42.576863 ], [ -70.757283, 42.570455 ], [ -70.804091, 42.561595 ], [ -70.815391, 42.554195 ], [ -70.823291, 42.551495 ], [ -70.848492, 42.550195 ], [ -70.871382, 42.546404 ], [ -70.872357, 42.542952 ], [ -70.866279, 42.522617 ], [ -70.859751, 42.520441 ], [ -70.857125, 42.521492 ], [ -70.842091, 42.519495 ], [ -70.831091, 42.503596 ], [ -70.835991, 42.490496 ], [ -70.841591, 42.487596 ], [ -70.847391, 42.491496 ], [ -70.857791, 42.490296 ], [ -70.879692, 42.478796 ], [ -70.886493, 42.470197 ], [ -70.887992, 42.467096 ], [ -70.887292, 42.464896 ], [ -70.894292, 42.460896 ], [ -70.908092, 42.466896 ], [ -70.917693, 42.467996 ], [ -70.921993, 42.466696 ], [ -70.934993, 42.457896 ], [ -70.934264, 42.444646 ], [ -70.933155, 42.437833 ], [ -70.928226, 42.430986 ], [ -70.913192, 42.427697 ], [ -70.908392, 42.425197 ], [ -70.901992, 42.420297 ], [ -70.905692, 42.416197 ], [ -70.936393, 42.418097 ], [ -70.943295, 42.436248 ], [ -70.943612, 42.452092 ], [ -70.94702, 42.456236 ], [ -70.96047, 42.446166 ], [ -70.960647, 42.443787 ], [ -70.982294, 42.431296 ], [ -71.025777, 42.444753 ], [ -71.053496, 42.475895 ], [ -71.035296, 42.506995 ], [ -71.040983, 42.526262 ], [ -71.075257, 42.531122 ], [ -71.070978, 42.555889 ], [ -71.057164, 42.574151 ], [ -71.028312, 42.574082 ], [ -71.058772, 42.608996 ], [ -71.076133, 42.604077 ], [ -71.13529, 42.599061 ], [ -71.158617, 42.612948 ], [ -71.165015, 42.597959 ], [ -71.172108, 42.616751 ], [ -71.256103, 42.656691 ], [ -71.238103, 42.669491 ], [ -71.25518, 42.73665 ], [ -71.245504, 42.742589 ] ] ] ] } },{ ""type"": ""Feature"", ""properties"": { ""name"": ""Worcester County, MA"",  ""vfreight_c"": ""25027"", ""color"": ""#948A54"",""longitude"": -71.940282, ""dollars"": 0.000000, ""in_region"": 0 }, ""geometry"": { ""type"": ""MultiPolygon"", ""coordinates"": [ [ [ [ -72.124526, 42.717636 ], [ -71.981402, 42.713294 ], [ -71.928811, 42.712234 ], [ -71.898716, 42.71142 ], [ -71.897089, 42.703826 ], [ -71.85782, 42.674987 ], [ -71.85841, 42.63384 ], [ -71.844843, 42.637985 ], [ -71.775322, 42.636663 ], [ -71.775742, 42.644216 ], [ -71.664614, 42.611589 ], [ -71.67773, 42.539397 ], [ -71.67898, 42.530351 ], [ -71.635812, 42.524091 ], [ -71.636079, 42.539924 ], [ -71.620039, 42.55245 ], [ -71.594643, 42.54337 ], [ -71.580287, 42.550467 ], [ -71.538949, 42.543069 ], [ -71.531476, 42.520487 ], [ -71.560367, 42.47435 ], [ -71.543297, 42.466451 ], [ -71.559046, 42.411981 ], [ -71.604251, 42.397703 ], [ -71.580043, 42.386949 ], [ -71.603187, 42.367329 ], [ -71.610007, 42.357403 ], [ -71.624702, 42.350465 ], [ -71.585168, 42.310977 ], [ -71.551126, 42.326395 ], [ -71.486768, 42.330075 ], [ -71.497046, 42.289829 ], [ -71.513048, 42.267148 ], [ -71.562194, 42.267651 ], [ -71.586759, 42.259545 ], [ -71.599318, 42.225959 ], [ -71.58291, 42.195559 ], [ -71.502626, 42.191416 ], [ -71.497378, 42.166643 ], [ -71.478119, 42.156782 ], [ -71.478521, 42.131421 ], [ -71.50091, 42.117041 ], [ -71.498258, 42.01722 ], [ -71.499905, 42.017198 ], [ -71.500905, 42.017098 ], [ -71.527306, 42.015098 ], [ -71.527606, 42.014998 ], [ -71.559439, 42.014342 ], [ -71.576908, 42.014098 ], [ -71.76601, 42.009745 ], [ -71.799242, 42.008065 ], [ -71.80065, 42.023569 ], [ -71.89078, 42.024368 ], [ -71.987326, 42.02688 ], [ -72.063496, 42.027347 ], [ -72.102162, 42.028899 ], [ -72.135687, 42.030245 ], [ -72.135715, 42.030245 ], [ -72.135023, 42.161708 ], [ -72.199304, 42.153588 ], [ -72.200626, 42.161287 ], [ -72.263876, 42.183885 ], [ -72.262792, 42.202534 ], [ -72.221218, 42.245252 ], [ -72.218068, 42.248605 ], [ -72.214821, 42.249041 ], [ -72.214584, 42.247571 ], [ -72.21046, 42.247205 ], [ -72.211079, 42.251262 ], [ -72.217879, 42.270089 ], [ -72.203363, 42.291162 ], [ -72.210795, 42.31138 ], [ -72.274639, 42.301963 ], [ -72.284239, 42.352057 ], [ -72.314599, 42.343526 ], [ -72.310236, 42.38753 ], [ -72.315994, 42.394544 ], [ -72.306284, 42.420114 ], [ -72.283408, 42.441196 ], [ -72.291424, 42.479495 ], [ -72.244952, 42.513552 ], [ -72.26922, 42.533403 ], [ -72.276452, 42.57685 ], [ -72.261321, 42.575868 ], [ -72.267064, 42.600813 ], [ -72.254713, 42.611633 ], [ -72.227832, 42.615788 ], [ -72.224839, 42.638981 ], [ -72.22948, 42.662666 ], [ -72.271912, 42.674304 ], [ -72.282981, 42.721557 ], [ -72.124526, 42.717636 ] ] ] ] } }]}"

 

0
Rumen
Telerik team
answered on 15 Oct 2020, 11:55 AM

Hi Yana,

I hope you are doing well.

While the JSON is a valid one (it validates properly), it is not supported by the Kendo UI Map widget and respectively by its ASP.NET Web Forms wrapper - RadMap for ASP.NET AJAX.

You can see which is the supported format in this help article: https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/map/configuration/layers.datasource

Best Regards,
Rumen
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

Tags
Map
Asked by
Yana
Top achievements
Rank 1
Veteran
Answers by
Rumen
Telerik team
Yana
Top achievements
Rank 1
Veteran
Share this question
or