The map is displayed on a `Qt` widget.
In the following `Javascript` code, I have written `dragging: true`, but still I can't **"pan"** the map through the **"mouse"**.

**I have noticed that this problem occurs ONLY when this code is executed w.r.t a Qt's widget, never when it is executed in a browser!**

Qt Code:
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Leaflet Quick Start Guide Example</title>
  5. <meta charset="utf-8" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.4/leaflet.css" />
  8. </head>
  9.  
  10. <body onload="displayMapAndClick ()" topmargin="0" leftmargin="0">
  11. <div id="map" style="width: 600px; height: 600px"></div>
  12. <script src="http://cdn.leafletjs.com/leaflet-0.4/leaflet.js"></script>
  13.  
  14. <script>
  15. var map;
  16. var centerPoint;
  17. var arrayCenterPoints = new Array ();
  18. var arrayFileNames = new Array ();
  19. var arrayCorners = new Array ();
  20. var arrayList = new Array ();
  21.  
  22. function displayMapAndClick ()
  23. {
  24. map = L.map ('map',
  25. {
  26. dragging: true
  27. }).setView ([51.505, -0.09], 13, true);
  28.  
  29. L.tileLayer('http://{s}.tile.cloudmade.com/24c8d683cff74bffa7f00e59cd858e00/997/256/{z}/{x}/{y}.png',
  30. {
  31. attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://cloudmade.com">CloudMade</a>',
  32. maxZoom: 13,
  33. }).addTo (map);
  34.  
  35. selectCenterPoint ();
  36. }
  37.  
  38. function selectCenterPoint ()
  39. {
  40. var popup = L.popup();
  41.  
  42. function onMapClick (e)
  43. {
  44. popup
  45. .setLatLng (e.latlng)
  46. .setContent ("You clicked the map at: " + e.latlng.toString())
  47. .openOn (map);
  48.  
  49. map.panTo (e.latlng);
  50. L.marker (e.latlng).addTo (map).bindPopup ("<b>Center point: </b>" + "<br>" + e.latlng + "<br />").openPopup ();
  51. centerPoint = e.latlng;
  52. }
  53. map.on ('click', onMapClick);
  54. }
To copy to clipboard, switch view to plain text mode 
----------

What else info do I need to present here?