3 Answers, 1 is accepted
0
David
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 18 Dec 2018, 02:25 PM
I am having opposite problem. My map zooms on double-click and i would like to avoid that.
Any suggestions?
0
Hi David,
Regards,
Marin Bratanov
Progress Telerik
You can prevent the zoomStart event if the event is a double click/tap. For example (I'm fairly certain jQuery always sends "doubleTap" but just in case I showed a more robust check in case it may send a dlbclick in some browser):
<script> function OnZoomStart(evt) { if (evt.originalEvent.type && ( evt.originalEvent.type.indexOf("double") > -1 || evt.originalEvent.type.indexOf("dbl") > -1) ) { evt.preventDefault(); } }</script><telerik:RadMap RenderMode="Lightweight" runat="server" ID="RadMap1" Zoom="2" Width="300px" Height="300px"> <ClientEvents OnZoomStart="OnZoomStart" /> <CenterSettings Latitude="23" Longitude="10" /> <LayersCollection> <telerik:MapLayer Type="Tile" Subdomains="a,b,c" UrlTemplate="https://#= subdomain #.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png" Attribution="© <a href='http://osm.org/copyright' title='OpenStreetMap contributors' target='_blank'>OpenStreetMap contributors</a>."> </telerik:MapLayer> </LayersCollection></telerik:RadMap>Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
David
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 20 Dec 2018, 01:41 PM
Solved!
Thank you Marin