I get an error in kendo.all.min.js when I try to get locations from my server.
Using this code with version 2014.2.716:
I don't get any markers on the map, but just the error 'Uncaught TypeError: undefined is not a function ' in the kendo file.
The Data I get back from the GetMapLocations is:
Any idea what's wrong?
Using this code with version 2014.2.716:
@(Html.Kendo().Map()
.Name("map")
.Center(52.0364073866421, 5.08653521339329)
.Zoom(17)
.Layers(layers =>
{
layers.Add()
.Type(MapLayerType.Tile)
.UrlTemplateId("http://#= subdomain #.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png")
.Subdomains("a", "b", "c")
.Attribution("© <
a
href
=
'http://osm.org/copyright'
>OpenStreetMap contributors</
a
>");
layers.Add()
.Type(MapLayerType.Marker)
.DataSource(dataSource => dataSource
.Read(read =>
read.Action("GetMapLocations", "Map")
)
)
.LocationField("LatLng")
.TitleField("Name");
})
)
I don't get any markers on the map, but just the error 'Uncaught TypeError: undefined is not a function ' in the kendo file.
The Data I get back from the GetMapLocations is:
{
"Data"
: [
{
"Id"
:
"193bfa30-ab5a-4752-9e9c-1d5187d49047"
,
"Name"
:
"1"
,
"Position"
: {
"Id"
:
"4f0e020c-2e94-4761-93c7-eef076b348ce"
,
"Latitude"
: 52.014538374454474,
"Longitude"
: 5.114317642759112,
"LatLng"
: [
52.014538374454474,
5.114317642759112
]
},
"LatLng"
: [
52.014538374454474,
5.114317642759112
]
},
{
"Id"
:
"8c85a22f-3c8e-4ccc-9470-f4b8af99db5c"
,
"Name"
:
"100"
,
"Position"
: {
"Id"
:
"050d1479-74b3-45dc-8828-7dbecdd5c71b"
,
"Latitude"
: 52.03355319309421,
"Longitude"
: 5.084548511286869,
"LatLng"
: [
52.03355319309421,
5.084548511286869
]
},
"LatLng"
: [
52.03355319309421,
5.084548511286869
]
}
],
"Total"
: 9360
}
Any idea what's wrong?