Improved www.ttss.krakow.pl
2 files modified
9 ■■■■■ changed files
map.html 4 ●●●● patch | view | raw | blame | history
map.js 5 ●●●● patch | view | raw | blame | history
map.html
@@ -4,7 +4,7 @@
<title>TTSS Kraków - Mapa</title>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.2.1/css/ol.css" integrity="sha384-6Ku0bdGS1If4LlZPWpe2wTx/qu/Y+YJob6lvk4Yi49uWWFqASeOF130VK3KjIPgh" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/css/ol.css" integrity="sha384-6Ku0bdGS1If4LlZPWpe2wTx/qu/Y+YJob6lvk4Yi49uWWFqASeOF130VK3KjIPgh" crossorigin="anonymous">
<link rel="stylesheet" href="map.css?v6" type="text/css" />
<link rel="manifest" href="map.manifest" />
</head>
@@ -19,7 +19,7 @@
</div>
<div id="panel"></div>
<script src="https://polyfill.io/v3/polyfill.min.js?features=Array.prototype.forEach,Array.prototype.includes,Array.prototype.map,Element.prototype.classList,Promise,String.prototype.startsWith,XMLHttpRequest,requestAnimationFrame"></script>
<script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.2.1/build/ol.js" integrity="sha384-Dg6Qd9Ovz0HgMsjQJjA+5upeLnRSrseIbJbT86LMVpuzuLfzffIleOxTCHIAUp6y" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.1/build/ol.js" integrity="sha384-pOrIhclJOIWlmYwhc69tvE0NTGhH7/oEdC9zrxJ3yyKMR+aCxEVIc4tj51WxVocG" crossorigin="anonymous"></script>
<script tyle="text/javascript" src="lang_pl.js?v10" id="lang_script"></script>
<script tyle="text/javascript" src="common.js?v11"></script>
<script tyle="text/javascript" src="map.js?v25"></script>
map.js
@@ -2,6 +2,7 @@
var api_refresh = 10000; // 10 seconds
var api_poll_url = 'http://127.0.0.1/sub';
var api_poll_refresh = 1000;
var geolocation = null;
var geolocation_set = 0;
@@ -406,7 +407,7 @@
        ).done(function(data) {
            try {
                if(this.request.status == 304) {
                    setTimeout(self.fetchDiff.bind(self), 1000);
                    setTimeout(self.fetchDiff.bind(self), api_poll_refresh);
                    return;
                }
                self.lastUpdate = this.request.getResponseHeader('Etag');
@@ -1112,6 +1113,7 @@
                url: 'https://tiles.ttss.pl/x' + pixelRatio + '/{z}/{x}/{y}.png',
                maxZoom: 19,
                tilePixelRatio: pixelRatio,
                opaque: false,
            }),
        }),
        route_layer,
@@ -1131,6 +1133,7 @@
            center: ol.proj.fromLonLat([19.94, 50.06]),
            zoom: 14,
            maxZoom: 19,
            constrainResolution: true,
        }),
        controls: ol.control.defaults({
            attributionOptions: ({