Improved www.ttss.krakow.pl
Jacek Kowalski
2019-02-09 376c6e93830ba8f2b4615a6eff72c70eff451bc9
Fix geolocation projection
2 files modified
4 ■■■■ changed files
map.html 2 ●●● patch | view | raw | blame | history
map.js 2 ●●● patch | view | raw | blame | history
map.html
@@ -26,6 +26,6 @@
<script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v5.3.0/build/ol.js" integrity="sha384-iQkGyyH4ioz3m+maM3s9MX1Oq67mACa4B9Z3ovUv3Sv37LJ96fx3WnZfLoiC3Wfl" crossorigin="anonymous"></script>
<script tyle="text/javascript" src="lang_pl.js?v4" id="lang_script"></script>
<script tyle="text/javascript" src="common.js?v6"></script>
<script tyle="text/javascript" src="map.js?v10"></script>
<script tyle="text/javascript" src="map.js?v11"></script>
</body>
</html>
map.js
@@ -947,7 +947,7 @@
        geolocation_button.className = 'hidden';
    }
    
    geolocation = new ol.Geolocation();
    geolocation = new ol.Geolocation({projection: 'EPSG:3857'});
    geolocation.on('change:position', function() {
        var coordinates = geolocation.getPosition();
        geolocation_feature.setGeometry(coordinates ? new ol.geom.Point(coordinates) : null);