hjg
2024-07-09 30304784e82d4bba24121328da8eb8490aec4f4f
提交 | 用户 | 时间
58d006 1 <!DOCTYPE html>
A 2 <html>
3 <head>
4   <meta charset="utf-8">
5   <title>GMaps.js &mdash; Fusion Tables layers</title>
6   <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
7   <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
8   <script type="text/javascript" src="../gmaps.js"></script>
9   <link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css" />
10   <link rel="stylesheet" type="text/css" href="examples.css" />
11   <script type="text/javascript">
12     var map, infoWindow;
13     $(document).ready(function(){
14       infoWindow = new google.maps.InfoWindow({});
15       map = new GMaps({
16         el: '#map',
17         zoom: 11,
18         lat: 41.850033,
19         lng: -87.6500523
20       });
21       map.loadFromFusionTables({
22         query: {
23           select: '\'Geocodable address\'',
24           from: '1mZ53Z70NsChnBMm-qEYmSDOvLXgrreLTkQUvvg'
25         },
26         suppressInfoWindows: true,
27         events: {
28           click: function(point){
29             infoWindow.setContent('You clicked here!');
30             infoWindow.setPosition(point.latLng);
31             infoWindow.open(map.map);
32           }
33         }
34       });
35     });
36   </script>
37 </head>
38 <body>
39   <h1>GMaps.js &mdash; Fusion Tables layers</h1>
40   <div class="row">
41     <div class="span11">
42       <div id="map"></div>
43     </div>
44     <div class="span6">
45       <p>GMaps.js allows to add Fusion Table layers:</p>
46       <pre>infoWindow = new google.maps.InfoWindow({});
47 map.loadFromFusionTables({
48   query: {
49     select: '\'Geocodable address\'',
50     from: '1mZ53Z70NsChnBMm-qEYmSDOvLXgrreLTkQUvvg'
51   },
52   suppressInfoWindows: true,
53   events: {
54     click: function(point){
55       infoWindow.setContent('You clicked here!');
56       infoWindow.setPosition(point.latLng);
57       infoWindow.open(map.map);
58     }
59   }
60 });</pre>
61       <p>
62         <span class="label notice">Note: </span> You can learn more about Fusion Table layers <a href="https://developers.google.com/maps/documentation/javascript/layers#FusionTables">here</a>.</p>
63     </div>
64   </div>
65 </body>
66 </html>