- Home
- Forum
- ASP.NET MVC - EJ 2
- EJ2 Maps, Cannot access the markerClick Event of a marker
EJ2 Maps, Cannot access the markerClick Event of a marker
ASP.NET Core MVC, Version: 23.1.36
CSHTML File:
<ejs-maps id="maps" markerClick="onMarkerClick" load="window.onMapLoad" loaded="onCreated" centerPosition="CenterPosition" class="vh-80" useGroupingSeparator=true>
<e-maps-titlesettings alignment="@Syncfusion.EJ2.Maps.Alignment.Center" text="Aktuelle Positionen" textStyle="@TextStyle">
</e-maps-titlesettings>
<e-maps-zoomsettings zoomFactor="@InitialZoom" maxZoom="18" minZoom="2" enable="true" DoubleClickZoom="true" MouseWheelZoom="true"></e-maps-zoomsettings>
<e-maps-layers>
<e-maps-layer layerType="@Syncfusion.EJ2.Maps.ShapeLayerType.OSM" markerClusterSettings="cluster">
<e-layersettings-markers>
<e-layersettings-marker visible="true" template="#template" tooltipSettings="tooltip" dataSource="data">
</e-layersettings-marker>
<e-layersettings-marker visible="true" template="#templateSelected" tooltipSettings="tooltip">
</e-layersettings-marker>
</e-layersettings-markers>
</e-maps-layer>
</e-maps-layers>
</ejs-maps>
<div id='template' style="display:none">
<div class="shadow-lg rounded border border-1 border-primary p-1 map-marker-box marker-template" data-vehicle="{{:name}}">
<p class="text-center pb-0 mb-0">
<i class="fa-duotone fa-bus-simple fa-xl map-marker-icon"></i><br />
<strong>{{:name}}</strong>
</p>
</div>
</div>
None of the events trigger the onMarkerClick() Javascript function that I have in the js file.
What event on which element will work for this situation?
FYI: The markerClick event doesn't work because we have a custom template.
Thanks for all the help.
{{:name}}
{{:name}}
Hi Chris,
We can reproduce the issue - “markerClick event is not working when clicked on the marker template” in the Maps component. We have considered this as a defect and logged a defect report for the same. However, we will include the fix for this issue in our weekly patch release which is expected to be available by the end of October 2023. Meanwhile, please find the feedback link below to keep track of the reported issue.
https://www.syncfusion.com/feedback/47478
Regards,
Mukilan.S
Hi Chris,
We have included the fix for the reported issue - "markerClick event is not working when clicked on the marker template" in our weekly patch release(v23.1.43). Please update the "Syncfusion.EJ2.AspNet.Core " package to this version and refer the same version of "ej2.min.js" script file in your application to resolve the reported issue. You can find the package and script file from the below links.
Package: https://www.nuget.org/packages/Syncfusion.EJ2.AspNet.Core/23.1.43
Script: https://cdn.syncfusion.com/ej2/23.1.43/dist/ej2.min.js
Please let us know if you need any further assistance.
- 2 Replies
- 3 Participants
-
CH Chris
- Oct 6, 2023 10:16 AM UTC
- Oct 31, 2023 02:15 PM UTC