159af89eef5669858e8952d9dbbf7c8d95629805
[framework/web/web-ui-fw.git] / libs / js / jquery-geo-1.0a4 / docs / geomap / geomapdblclick.html
1 <!doctype html>  
2
3 <html lang="en" class="no-js">
4 <head>
5   <meta charset="utf-8">
6
7   <title>dblclick | geomap</title>
8   <meta name="description" content="geomap dblclick event">
9   <meta name="author" content="Ryan Westphal">
10
11   <meta name="viewport" content="width=device-width, initial-scale=1.0">
12
13   <link rel="stylesheet" href="../css/style.css?v=2">
14   <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
15 </head>
16
17 <body>
18
19   <div id="dblclick" data-role="page">
20     <div data-role="header" data-theme="a">
21       <h1>dblclick</h1>
22     </div>
23     
24     <div data-role="content">
25       <table>
26         <tr>
27           <th>type</th>
28           <td>position</td>
29         </tr>
30         <tr>
31           <th>init</th>
32           <td><code><pre>$( <i>selector</i> ).geomap( {
33   dblclick: function( e, geo ) { }
34 } );</pre></code></td>
35         </tr>
36         <tr>
37           <th>bind</th>
38           <td><code><pre>$( <i>selector</i> ).bind( &quot;geomapdblclick&quot;, function( e, geo ) { } );
39 } );</pre></code></td>
40         </tr>
41       </table>
42       <p>The dblclick event triggers when the user double-clicks or double-taps a point on the map. However, it only triggers if the user is not currently performing some other action which might be handled internally by the widget.</p>
43       <p>The geo argument is a <a href="http://geojson.org/geojson-spec.html#point" rel="external">GeoJSON Point</a> object of the clicked location in map coordinates.</p>
44       <p>The default action for a double-click/tap is to zoom the map in one level. However, as a developer you can override this by calling e.preventDefault() in your callback.</p>
45       <code><pre>$( &quot;#map&quot; ).geomap( {
46   dblclick: function( e, geo ) { e.preventDefault(); }
47 } );</pre></code>
48     </div>
49   </div> <!-- end of #container -->
50
51   <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
52   <script src="http://code.jquerygeo.com/jquery.geo-1.0a4.min.js"></script>
53   <script src="../js/script.js"></script>
54   <script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
55 </body>
56 </html>
57