|
Last change
on this file since 9060 was 9060, checked in by rick, 15 years ago |
|
Some default zoom and navigation buttons are prefered during debugging.
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Date Revision
-
Property svn:mime-type
set to
text/html
|
|
File size:
1.7 KB
|
| Line | |
|---|
| 1 | <html>
|
|---|
| 2 | <head>
|
|---|
| 3 |
|
|---|
| 4 | <script src="http://maps.google.com/maps?file=api&v=2&key={{ google_key }}"></script>
|
|---|
| 5 | <script>
|
|---|
| 6 |
|
|---|
| 7 | bounds = new GLatLngBounds( new GLatLng(-90, -180)
|
|---|
| 8 | , new GLatLng(90, 180)
|
|---|
| 9 | );
|
|---|
| 10 | copyright = new GCopyright( 'your-copyright'
|
|---|
| 11 | , bounds
|
|---|
| 12 | , 0
|
|---|
| 13 | , "(c) 2008 Your Organization " +
|
|---|
| 14 | "<http://www.example.org/>"
|
|---|
| 15 | );
|
|---|
| 16 | copyrights = new GCopyrightCollection();
|
|---|
| 17 | copyrights.addCopyright(copyright);
|
|---|
| 18 | heatmap = new GTileLayer(copyrights, 10, 0);
|
|---|
| 19 | heatmap.getTileUrl = function (tile, zoom) {
|
|---|
| 20 | base = 'http://127.0.0.1:8000/gheat/';
|
|---|
| 21 | color_scheme = 'classic';
|
|---|
| 22 | url = base + color_scheme +'/'+ zoom +'/'
|
|---|
| 23 | url += tile.x +','+ tile.y +'.png';
|
|---|
| 24 | return url;
|
|---|
| 25 | }
|
|---|
| 26 | heatmap.isPng = function () {return true;}
|
|---|
| 27 | heatmap.getOpacity = function () {return 1.0;}
|
|---|
| 28 |
|
|---|
| 29 | function initialize () {
|
|---|
| 30 | var map = new GMap2(document.getElementById("map"));
|
|---|
| 31 | var lebanon = new GLatLng(52.15,4.47);
|
|---|
| 32 | map.setCenter(lebanon, 13);
|
|---|
| 33 | map.setUIToDefault();
|
|---|
| 34 | map.addOverlay(new GTileLayerOverlay(heatmap));
|
|---|
| 35 | }
|
|---|
| 36 |
|
|---|
| 37 | </script>
|
|---|
| 38 | <style>
|
|---|
| 39 | body {
|
|---|
| 40 | margin: 0;
|
|---|
| 41 | padding: 0;
|
|---|
| 42 | }
|
|---|
| 43 | #map {
|
|---|
| 44 | margin: 0;
|
|---|
| 45 | padding: 0;
|
|---|
| 46 | width: 100%;
|
|---|
| 47 | height: 100%;
|
|---|
| 48 | }
|
|---|
| 49 | </style>
|
|---|
| 50 | </head>
|
|---|
| 51 | <body onload="initialize()" onunload="GUnload()">
|
|---|
| 52 | <div id="map"> </div>
|
|---|
| 53 | </body>
|
|---|
| 54 | </html>
|
|---|
| 55 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.