Blame view

frontend/web/js/gmaps.init.js 1.04 KB
7832919c   Alexey Boroda   -Ready
1
2
  $(
      function() {
ae432de6   Alexey Boroda   first commit
3
  
7832919c   Alexey Boroda   -Ready
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
          function initMap() {
              var newLat = window.lat;
              var lng = window.lon;
              var styles = [{
                  stylers: [
                      { saturation: -100 }
                  ]
              }];
              map = new GMaps({
                  el: '#map',
                  lat: newLat,
                  lng: lng,
                  zoomControl: true,
                  zoomControlOpt: {
                      style: 'SMALL',
                      position: 'TOP_LEFT'
                  },
                  panControl: false,
                  streetViewControl: false,
                  mapTypeControl: false,
                  overviewMapControl: false,
                  scrollwheel: false,
                  draggable: false,
                  styles: styles,
                  zoom: 14
              });
ae432de6   Alexey Boroda   first commit
30
  
7832919c   Alexey Boroda   -Ready
31
              var image = '/img/marker2.png';
ae432de6   Alexey Boroda   first commit
32
  
7832919c   Alexey Boroda   -Ready
33
34
35
36
37
38
              map.addMarker({
                  lat: newLat,
                  lng: lng,
                  icon: image
              });
          }
ae432de6   Alexey Boroda   first commit
39
  
7832919c   Alexey Boroda   -Ready
40
41
42
          window.initMap = initMap();
      }
  );