Telerik Forums
UI for ASP.NET MVC Forum
1 answer
294 views
Hi,
I've been trying out the new Map widget and, whilst the map displays fine, I can't seem to get any markers to display on the map.

I've used the MVC Wrapper markup below (based on the GeoJSON example on your demos web page). I've tried to figure out the correct configuration  for adding a single test marker but, as I say, nothing shows up. Are markers supported in the beta version or can you see anything wrong in my markup?

@(Html.Kendo().Map()
.Name("map")
.Center(37.5, 110)
.Zoom(3.4)
.Layers(layers => {
layers.Add()
.Style(style => style.Fill(fill => fill.Opacity(0.7)))
.Type(MapLayerType.Shape)
.DataSource(dataSource => dataSource
.GeoJson()
.Read(read => read.Url(Url.Content("~/Content/Countries.json")))
);
})
.Events(events => events
.ShapeCreated("onShapeCreated")
.ShapeMouseEnter("onShapeMouseEnter")
.ShapeMouseLeave("onShapeMouseLeave")
.ShapeClick("onShapeClick")
)
.Markers(markers => {
markers.Add()
.Shape(MapMarkerShape.Circle)
.Position(37.1, 110.1)
.Size(20)
.Color("Red");
})
)

Thanks, Ian
Hristo Germanov
Telerik team
 answered on 22 Nov 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?