| 1 | <link href="https://cdnjs.cloudflare.com/ajax/libs/ol3/3.9.0/ol.min.css" rel="stylesheet"> |
| 2 | <script src="/js/jquery-1.10.2.js"></script> |
| 3 | <script src="/js/bootstrap.js"></script> |
| 4 | <script src="/https://cdnjs.cloudflare.com/ajax/libs/ol3/3.9.0/ol.min.js"></script> |
| 5 | <script> |
| 6 | $(function(){ |
| 7 | var shrinkHeader = 80; |
| 8 | $(window).scroll(function() { |
| 9 | var scroll = getCurrentScroll(); |
| 10 | if ( scroll >= shrinkHeader ) { |
| 11 | $('.navbar-brand').addClass('navbar-shrink'); |
| 12 | $('.navbar-inverse').addClass('navbar-colored'); |
| 13 | $('.navbar-nav').css({"margin":"0 0 0 15px"}); |
| 14 | $(".sun").show(); |
| 15 | $('.navbar-lower').addClass('navbarlower-colored'); |
| 16 | |
| 17 | } |
| 18 | else{ |
| 19 | $('.navbar-brand').removeClass('navbar-shrink'); |
| 20 | $('.navbar-inverse').removeClass('navbar-colored'); |
| 21 | $('.navbar-nav').css({"margin":"25px 0 0 25px"}); |
| 22 | $(".sun").hide(); |
| 23 | $('.navbar-lower').removeClass('navbarlower-colored'); |
| 24 | |
| 25 | } |
| 26 | }); |
| 27 | function getCurrentScroll() { |
| 28 | return window.pageYOffset; |
| 29 | } |
| 30 | }); |
| 31 | |
| 32 | $('[data-toggle="tooltip"]').tooltip(); |
| 33 | $('.navbar-lower').affix({offset: {top: 60}}); |
| 34 | |
| 35 | |
| 36 | var map = new ol.Map({ |
| 37 | layers: [ |
| 38 | new ol.layer.Tile({ |
| 39 | source: new ol.source.OSM() |
| 40 | }) |
| 41 | ], |
| 42 | controls: ol.control.defaults({ |
| 43 | attributionOptions: /** @type {olx.control.AttributionOptions} */ ({ |
| 44 | collapsible: false |
| 45 | }) |
| 46 | }), |
| 47 | target: 'eventmap', |
| 48 | view: new ol.View({ |
| 49 | center: [50.7366,7.0912], |
| 50 | zoom: 15 |
| 51 | }) |
| 52 | }); |
| 53 | |
| 54 | |
| 55 | </script> |