Witam serdecznie,
Mam taki kod:
http://pastebin.com/h7gLaDQi

  1. <html xmlns="http://www.w3.org/1999/xhtml">
  2. <head>
  3. <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
  4. <title>mapka</title>
  5. <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
  6. <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  7. <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  8. <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  9. <link rel="stylesheet" href="/resources/demos/style.css">
  10. $(function() {
  11.  
  12. jQuery(function($){
  13. $.datepicker.regional['pl'] = {
  14. closeText: 'Zamknij',
  15. prevText: '&#x3c;Poprzedni',
  16. nextText: 'Następny&#x3e;',
  17. currentText: 'Dziś›',
  18. monthNames: ['Styczeń„','Luty','Marzec','Kwiecień„','Maj','Czerwiec',
  19. 'Lipiec','SierpieĹń','Wrzesień„','Październik','Listopad','GrudzieĹń'],
  20. monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
  21. 'Lip','Sie','Wrz','Pa','Lis','Gru'],
  22. dayNames: ['Niedziela','Poniedziałek','Wtorek','ښroda','Czwartek','Pią…tek','Sobota'],
  23. dayNamesShort: ['Nie','Pn','Wt','ښr','Czw','Pt','So'],
  24. dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
  25. dateFormat: 'yy-mm-dd', firstDay: 1,
  26. isRTL: false};
  27. $.datepicker.setDefaults($.datepicker.regional['pl']);
  28. });
  29.  
  30. /*
  31. setInterval(function(){cache_clear()},3000);
  32. function cache_clear()
  33. {
  34. window.location.reload(true);
  35. }
  36. */
  37.  
  38. $('#datepicker').datepicker();
  39. $.datepicker.setDefaults(
  40. $.extend(
  41. {'dateFormat':'yy-mm-dd'},
  42. $.datepicker.regional['pl']
  43. )
  44. );
  45. });
  46. </script>
  47. <script type="text/javascript">
  48. var icon = new google.maps.MarkerImage("http://maps.google.com/mapfiles/ms/micons/blue.png",
  49. new google.maps.Size(32, 32), new google.maps.Point(0, 0),
  50. new google.maps.Point(16, 32));
  51. var center = null;
  52. var map = null;
  53. var currentPopup;
  54. var bounds = new google.maps.LatLngBounds();
  55. function addMarker(lat, lng, info) {
  56. var pt = new google.maps.LatLng(lat, lng);
  57. bounds.extend(pt);
  58. var marker = new google.maps.Marker({
  59. position: pt,
  60. icon: icon,
  61. map: map
  62. });
  63. var popup = new google.maps.InfoWindow({
  64. content: info,
  65. maxWidth: 300
  66. });
  67. google.maps.event.addListener(marker, "click", function() {
  68. if (currentPopup != null) {
  69. currentPopup.close();
  70. currentPopup = null;
  71. }
  72. popup.open(map, marker);
  73. currentPopup = popup;
  74. });
  75. google.maps.event.addListener(popup, "closeclick", function() {
  76. map.panTo(center);
  77. currentPopup = null;
  78. });
  79. }
  80. function initMap() {
  81. map = new google.maps.Map(document.getElementById("map"), {
  82. center: new google.maps.LatLng(0, 0),
  83. zoom: 14,
  84. mapTypeId: google.maps.MapTypeId.ROADMAP,
  85. mapTypeControl: false,
  86. mapTypeControlOptions: {
  87. style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR
  88. },
  89. navigationControl: true,
  90. navigationControlOptions: {
  91. style: google.maps.NavigationControlStyle.SMALL
  92. }
  93. });
  94. addMarker(18.17374500, 54.61604900,'<b></b><br/>1');
  95. addMarker(54.61604900, 18.17374500,'<b></b><br/>1');
  96. center = bounds.getCenter();
  97. map.fitBounds(bounds);
  98.  
  99. }
  100.  
  101. </script>
  102. </head>
  103.  
  104. <div style="width:100%;height:100px;text-align:center">
  105. <a href="index.php">Ostatnia pozycja</a><br/><br/>
  106. <a href="index.php?i=last_day">Dzisiejszy dzień</a><br/><br/>
  107.  
  108. <form action="index.php" method="get">
  109. Wybrany dzień<input type="text" name="select_day" value="2016-04-02" id="datepicker">
  110. <input type="submit" value="Pokaż">
  111. </form>
  112.  
  113. </div>
  114.  
  115. <body onload="initMap()">
  116. <div id="map" class="map" style="width:100%; height:100%"></div>
  117. </body>
  118. </html>


Chciałbym żeby punkty do wyświetlenia na mapce nie były statycznie ładowane przy wczytaniu strony - a odświeżane co 10 sekund...
Wie ktoś może jak to zrobić?

Z góry dziękuję za pomoc smile.gif