Map markers example

2 posts, 0 answers
  1. Ian
    Ian avatar
    129 posts
    Member since:
    Jun 2009

    Posted 21 Nov 2013 Link to this post

    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
  2. Hristo Germanov
    Admin
    Hristo Germanov avatar
    703 posts

    Posted 22 Nov 2013 Link to this post

    Hi Lan Price,

    There is a problem with the markers and we will fix it with the next internal build scheduled for the middle of the next week.

    The problem is the position property of the markers. And  we will make it to work andwe will rename it to location. So the new property that you need to set is http://docs.kendoui.com/api/dataviz/map#configuration-markers.location.

    Can you please update to the next internal build and if you find something that is not working please contact us for a quick fix.

    Thank you for the help. I have updated your point.

    Regards,
    Hristo Germanov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top