/index.html

http://github.com/petewarden/iPhoneTracker · HTML · 93 lines · 79 code · 14 blank · 0 comment · 0 complexity · b28396dc8842c1690d7345b766d8614a MD5 · raw file

  1. <html>
  2. <head>
  3. <link rel="stylesheet" type="text/css" href="http://static.openheatmap.com/css/mainstyle.css"/>
  4. <style type="text/css">
  5. a { text-decoration: underline; }
  6. a:link { text-decoration: underline;}
  7. a:visited { text-decoration: underline;}
  8. </style>
  9. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
  10. <script type="text/javascript" src="http://static.openheatmap.com/scripts/jquery.openheatmap.js"></script>
  11. <script type='text/javascript'>
  12. g_isMapCreated = false;
  13. g_csvString = null;
  14. g_deviceName = null;
  15. g_mapSettings = {
  16. "zoom_slider_power":5,
  17. "zoomed_out_degrees_per_pixel":-180,
  18. "zoomed_in_degrees_per_pixel":-0.01,
  19. "is_gradient_value_range_set":"false",
  20. "gradient_value_min":"1",
  21. "gradient_value_max":"14",
  22. "point_blob_radius":8.32,
  23. "point_blob_value":1,
  24. "show_map_tiles":true,
  25. "map_server_root":"http:\/\/a.tile.openstreetmap.org\/",
  26. "information_alpha":0.92,
  27. "show_zoom":true,
  28. "allow_pan":true,
  29. "point_drawing_shape":"circle",
  30. "circle_line_color":0,
  31. "circle_line_alpha":1,
  32. "circle_line_thickness":1,
  33. "is_point_blob_radius_in_pixels":true,
  34. "credit_text": "OpenStreetMap/OpenHeatMap",
  35. };
  36. $(document).ready(function() {
  37. $('#openheatmap_container').insertOpenHeatMap({
  38. width: 1000,
  39. height: 720,
  40. prefer: 'canvas'
  41. });
  42. });
  43. function onMapCreated() {
  44. var openHeatMap = $.getOpenHeatMap();
  45. for (var key in g_mapSettings) {
  46. var value = g_mapSettings[key];
  47. openHeatMap.setSetting(key, value);
  48. }
  49. openHeatMap.setColorGradient(["#eaf8b800","#eae40f16","#4f2d00dd"]);
  50. g_isMapCreated = true;
  51. if (g_csvString!=null) {
  52. loadLocationData();
  53. }
  54. }
  55. function storeLocationData(csvString, deviceName) {
  56. g_csvString = csvString;
  57. g_deviceName = deviceName;
  58. if (g_isMapCreated) {
  59. loadLocationData();
  60. }
  61. }
  62. function loadLocationData() {
  63. var openHeatMap = $.getOpenHeatMap();
  64. openHeatMap.loadValuesFromCSVString(g_csvString);
  65. $('#message').text(g_deviceName);
  66. openHeatMap.setAnimationTime('All Time');
  67. }
  68. </script>
  69. </head>
  70. <body style="margin:0px; padding:0px; position:relative;">
  71. <div id="openheatmap_container" style="margin:0px; padding:0px;"></div>
  72. <div id="message" style="position:absolute; top:20px; left:0px; width: 1000px; text-align:center; font-size:200%;">
  73. Loading <img src="http://static.openheatmap.com/images/loading.gif"/>
  74. </div>
  75. <div id="credit" style="position:absolute; top:700px; left:0px; width: 1000px; text-align:center; font-size:180%;">
  76. <i>Map Background © <a href="http://www.openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a></i>
  77. </div>
  78. </body>
  79. </html>