Marker Click Event

2 posts, 0 answers
  1. Matt
    Matt avatar
    1 posts
    Member since:
    May 2015

    Posted 21 May 2015 Link to this post

    I have followed the tutorials and have confirmed that I have the latest version on UI for ASP.NET MVC installed, but I still can't get the Marker Click Event to fire on the Map feature. Below is the code I am using, any thoughts?

     

    @(Html.Kendo().Map()
                    .Name("map")
                    .Center(45.5095528, -91.9996693)
                    .Zoom(7)
                    .Layers(layers =>
                    {
                        layers.Add()
                            .Type(MapLayerType.Tile)
                            .UrlTemplate("http://tile2.opencyclemap.org/transport/#= zoom #/#= x #/#= y #.png")
                            .Subdomains("a", "b", "c")
                            .Attribution("&copy; <a href='http://osm.org/copyright'>OpenStreetMap contributors</a>." +
                                         "Tiles courtesy of <a href='http://www.opencyclemap.org/'>Andy Allan</a>");

                        layers.Add()
                            .Type(MapLayerType.Shape)
                            .DataSource(dataSource => dataSource
                                .Read(read => read.Action("HospitalLocations", "Home"))
                                )
                                .LocationField("Location")
                                .Shape(.Pin)
                                .TitleField("Title")
                                .ValueField("ID");
                    })
                    .Events(events => events.MarkerClick("onClick")))

  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 25 May 2015 Link to this post

    Hello Matt,

    I tried reproducing this, but everything worked as expected on our side. Would you please check this screencast and let me know if I am doing something differently?

    Regards,
    Alexander Popov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top