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

Marker Click Event

1 Answer 92 Views
Map
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 21 May 2015, 06:19 PM

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")))

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 25 May 2015, 01:35 PM
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
Tags
Map
Asked by
Matt
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or