Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div id="map_canvas" style="width: 100%; height: 450px"></div>

<table style="width: 100%; vertical-align: top;">
  <tr>
    <td>
      <ul class="pushup" style="list-style: none;">
        <li>
          <ul class="pushup" style="list-style: none;">
            Центральное управление
            <li>
              <a class="link current" data-position="[55.785074, 37.718887]" href=#>Москва</a>
            </li>
            <li>
              <a class="link" data-position="[54.780254, 32.049479]" href=#>Смоленск</a>
            </li>
            <li>
              <a class="link" data-position="[54.1958819, 37.6169383]" href=#>Тула</a>
            </li>
            <li>
              <a class="link" data-position="[54.515107, 36.2555539]" href=#>Калуга</a>
            </li>
          </ul>
        </li>
        <li>
          <ul class="pushup" style="list-style: none;">
            Северо-Западное управление
            <li>
              <a class="link" data-position="[59.9350184, 30.3312768]" href=#>Санкт-Петербург</a>
            </li>
            <li>
              <a class="link" data-position="[57.811749, 28.351214]" href=#>Псков</a>
            </li>
            <li>
              <a class="link" data-position="[54.709792, 20.499471]" href=#>Калининград</a>
            </li>
            <li>
              <a class="link" data-position="[64.5391728, 40.5249587]" href=#>Архангельск</a>
            </li>
            <li>
              <a class="link" data-position="[57.6370169, 39.8688054]" href=#>Ярославль</a>
            </li>
            <li>
              <a class="link" data-position="[59.21582, 39.89406]" href=#>Вологда</a>
            </li>
            <li>
              <a class="link" data-position="[56.972102, 40.97454]" href=#>Иваново</a>
            </li>
          </ul>
        </li>
        <li>
          <ul class="pushup" style="list-style: none;">
            Поволжское управление
            <li>
              <a class="link" data-position="[54.3188793, 48.3991991]" href=#>Ульяновск</a>
            </li>
            <li>
              <a class="link" data-position="[51.5331659, 46.015861]" href=#>Саратов</a>
            </li>
            <li>
              <a class="link" data-position="[53.235404, 50.192411]" href=#>Самара</a>
            </li>
            <li>
              <a class="link" data-position="[53.200656, 45.010506]" href=#>Пенза</a>
            </li>
            <li>
              <a class="link" data-position="[56.3218559, 44.009428]" href=#>Нижний Новгород</a>
            </li>
            <li>
              <a class="link" data-position="[53.508368, 49.278053]" href=#>Тольятти</a>
            </li>
            <li>
              <a class="link" data-position="[51.76826, 55.101472]" href=#>Оренбург</a>
            </li>
            <li>
              <a class="link" data-position="[56.623157, 47.890546]" href=#>Йошкар-Ола</a>
            </li>
            <li>
              <a class="link" data-position="[58.604091, 49.66106]" href=#>Киров</a>
            </li>
            <li>
              <a class="link" data-position="[55.789571, 49.138703]" href=#>Казань</a>
            </li>
            <li>
              <a class="link" data-position="[56.145516, 47.235465]" href=#>Чебоксары</a>
            </li>
            <li>
              <a class="link" data-position="[48.717483, 44.526897]" href=#>Волгоград</a>
            </li>
          </ul>
        </li>
        <li>
          <ul class="pushup" style="list-style: none;">
            Южное управление
            <li>
              <a class="link" data-position="[51.6439949, 39.1450937]" href=#>Воронеж</a>
            </li>
            <li>
              <a class="link" data-position="[47.274053, 39.712334]" href=#>Ростов на Дону</a>
            </li>
            <li>
              <a class="link" data-position="[52.967565, 36.063106]" href=#>Орел</a>
            </li>
            <li>
              <a class="link" data-position="[52.6027474, 39.603754]" href=#>Липецк</a>
            </li>
            <li>
              <a class="link" data-position="[45.0227976, 38.9723481]" href=#>Краснодар</a>
            </li>
            <li>
              <a class="link" data-position="[45.0375812, 41.9419722]" href=#>Ставрополь</a>
            </li>
            <li>
              <a class="link" data-position="[50.5954437, 36.5914875]" href=#>Белгород</a>
            </li>
            <li>
              <a class="link" data-position="[44.724342, 37.768123]" href=#>Новороссийск</a>
            </li>
          </ul>
        </li>
      </ul>
    </td>
    <td valign="top">
      <ul class="pushup" style="list-style: none;">
        <li>
          <ul class="pushup" style="list-style: none;">
            Уральское управление
            <li>
              <a class="link" data-position="[56.816098, 60.584402]" href=#>Екатеринбург</a>
            </li>
            <li>
              <a class="link" data-position="[57.998674, 56.243509]" href=#>Пермь</a>
            </li>
            <li>
              <a class="link" data-position="[61.678794, 50.838039]" href=#>Сыктывкар</a>
            </li>
            <li>
              <a class="link" data-position="[54.748533, 55.982845]" href=#>Уфа</a>
            </li>
            <li>
              <a class="link" data-position="[55.1552074, 61.3014357]" href=#>Челябинск</a>
            </li>
          </ul>
        </li>
        <li>
          <ul class="pushup" style="list-style: none;">
            Сибирское управление
            <li>
              <a class="link" data-position="[56.020565, 92.796455]" href=#>Красноярск</a>
            </li>
            <li>
              <a class="link" data-position="[55.024633, 82.926546]" href=#>Новосибирск</a>
            </li>
            <li>
              <a class="link" data-position="[57.152617, 65.555838]" href=#>Тюмень</a>
            </li>
            <li>
              <a class="link" data-position="[53.349202, 83.784733]" href=#>Барнаул</a>
            </li>
            <li>
              <a class="link" data-position="[61.0062336, 69.0341316]" href=#>Ханты-Мансийск</a>
            </li>
            <li>
              <a class="link" data-position="[54.985628, 73.386055]" href=#>Омск</a>
            </li>
          </ul>
        </li>
        <li>
          <ul class="pushup" style="list-style: none;">
            Дальневосточное управление
            <li>
              <a class="link" data-position="[53.0267896, 158.6466739]" href=#>Петропавловск-Камчатский</a>
            </li>
            <li>
              <a class="link" data-position="[48.4701017, 135.0770964]" href=#>Хабаровск</a>
            </li>
            <li>
              <a class="link" data-position="[50.2565927, 127.5705113]" href=#>Благовещенск</a>
            </li>
            <li>
              <a class="link" data-position="[52.2928783, 104.2870367]" href=#>Иркутск</a>
            </li>
            <li>
              <a class="link" data-position="[43.1054333, 131.871987]" href=#>Владивосток</a>
            </li>
          </ul>
        </li>
      </ul>
    </td>
  </tr>
</table>
              
            
!

CSS

              
                /*Стили для списка*/

.pushup {
  list-style: none;
  font-family: "Arial";
  font-size: 16px;
}

.pushup li {
  font-size: 16px;
  position: relative;
  padding: 20px 0 20px 40px;
  color: #000;
  font-weight: bold;
  font-family: "Arial";
}

.pushup li:before {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #867550;
  content: "";
  left: 0;
  transition: .3s ease-in-out;
  top: 27px;
}

.pushup li:after {
  position: absolute;
  border-left: 1px dotted #867550;
  width: 1px;
  bottom: -12px;
  content: "";
  left: 3px;
  top: 48px;
}

.pushup li:hover:before {
  box-shadow: 0 0 0 10px rgba(134, 117, 80, .7)
}

.pushup li:last-child:after {
  content: none;
}


/*Стили для маркера*/

.marker {
  position: absolute;
  cursor: pointer;
}

.pin-wrap {
  position: absolute;
  width: 100px;
  height: 100px;
  margin-top: -120.71068px;
  margin-left: -50px;
  -webkit-transform-origin: 50% 120.71068% 0;
  transform-origin: 50% 120.71068% 0;
}

.pin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  margin-top: -50px;
  margin-left: -50px;
  -webkit-transform-origin: 50% 120.71068% 0;
  transform-origin: 50% 120.71068% 0;
}

.pin::after {
  position: absolute;
  display: block;
  box-sizing: border-box;
  width: 100px;
  height: 100px;
  content: '';
  -webkit-transform: rotateZ(-45deg);
  transform: rotateZ(-45deg);
  border: 20px solid #867550;
  border-radius: 50% 50% 50% 50%;
}

.pin::before {
  position: absolute;
  display: block;
  box-sizing: border-box;
  width: 100px;
  height: 100px;
  content: '';
  -webkit-transform: rotateZ(-45deg);
  transform: rotateZ(-45deg);
  border: 18px solid #867550;
  border-radius: 50% 50% 50% 0;
}

.shadow {
  position: absolute;
}

.shadow::after {
  position: absolute;
  left: -125px;
  display: block;
  width: 50px;
  height: 50px;
  margin-top: -25px;
  content: '';
  -webkit-transform: rotateX(55deg);
  transform: rotateX(55deg);
  border-radius: 50%;
  box-shadow: rgba(0, 0, 0, 0.5) 100px 0 20px;
}

.pulse {
  position: absolute;
  margin-top: -50px;
  margin-left: -50px;
  -webkit-transform: rotateX(55deg);
  transform: rotateX(55deg);
}

.pulse::after {
  display: block;
  width: 100px;
  height: 100px;
  content: '';
  -webkit-animation: pulsate 1s ease-out;
  animation: pulsate 1s ease-out;
  -webkit-animation-delay: 1.1s;
  animation-delay: 1.1s;
  -webkit-animation-iteration-count: infinite;
  animation-iteration-count: infinite;
  opacity: 0;
  border-radius: 50%;
  box-shadow: 0 0 1px 2px rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 6px 3px #867550;
}

@-webkit-keyframes pulsate {
  0% {
    -webkit-transform: scale(0.1, 0.1);
    transform: scale(0.1, 0.1);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    -webkit-transform: scale(1.2, 1.2);
    transform: scale(1.2, 1.2);
    opacity: 0;
  }
}

@keyframes pulsate {
  0% {
    -webkit-transform: scale(0.1, 0.1);
    transform: scale(0.1, 0.1);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    -webkit-transform: scale(1.2, 1.2);
    transform: scale(1.2, 1.2);
    opacity: 0;
  }
}

.header {
  font-family: Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 2em;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 10px 0;
  text-align: center;
  color: #f93c11;
  background: rgba(255, 255, 255, 0.75);
}

.tags {
  font-weight: 300;
}

.list-label {
  font-family: Raleway, 'Century Gothic', CenturyGothic, AppleGothic, sans-serif;
  font-weight: 400;
}

.header li {
  display: inline-block;
}

.tags a {
  color: #f93c11;
}

.animations a {
  line-height: 42px;
  display: block;
  box-sizing: border-box;
  height: 44px;
  margin: 0 5px;
  padding: 0 10px;
  text-decoration: none;
  color: #f93c11;
  border: 2px solid #f93c11;
  border-radius: 22px;
  -webkit-transition: background-color 0.3s, color 0.3s;
  transition: background-color 0.3s, color 0.3s;
}

.animations a:hover {
  color: white;
  background: #f93c11;
}

.marker {
  display: none;
}

.marker-drop {
  display: block;
  animation: drop .3s ease;
}

@-webkit-keyframes drop {
  0% {
    -webkit-transform: translateY(-500px);
    transform: translateY(-500px);
  }
  100% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

@keyframes drop {
  0% {
    -webkit-transform: translateY(-500px);
    transform: translateY(-500px);
  }
  100% {
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

/* Стили для контактов*/

.googlemaps {
  display: none;
}

.marker:after {
  content: attr(data-adres);
  display: block;
  width: 10em;
  height: 3em;
  background: red;
  color: #fff;
}
              
            
!

JS

              
                // Code goes here

var marker;
var map;

CustomMarker.prototype = new google.maps.OverlayView();

function CustomMarker(opts) {
  this.setValues(opts);
}

CustomMarker.prototype.draw = function() {
  var self = this;
  var div = this.div;
  if (!div) {
    div = this.div = $('' +
      '<div class="marker" data-adres="Адрес">' +
      '<div class="shadow"></div>' +
      '<div class="pulse"></div>' +
      '<div class="pin-wrap">' +
      '<div class="pin"></div>' +
      '</div>' +
      '</div>' +
      '')[0];
    this.pinWrap = this.div.getElementsByClassName('pin-wrap');
    this.pin = this.div.getElementsByClassName('pin');
    this.pinShadow = this.div.getElementsByClassName('shadow');
    div.style.position = 'absolute';
    div.style.cursor = 'pointer';
    var panes = this.getPanes();
    panes.overlayImage.appendChild(div);
    google.maps.event.addDomListener(div, "click", function(event) {
      google.maps.event.trigger(self, "click", event);
    });
  }

  div.classList.remove('marker-drop');
  setTimeout(function() {
    div.classList.add('marker-drop');
  }, 100)

  var point = this.getProjection().fromLatLngToDivPixel(this.position);
  if (point) {
    div.style.left = point.x + 'px';
    div.style.top = point.y + 'px';
  }
};

CustomMarker.prototype.animateDrop = function() {
  dynamics.stop(this.pinWrap);
  dynamics.css(this.pinWrap, {
    'transform': 'scaleY(2) translateY(-' + $('#map').outerHeight() + 'px)',
    'opacity': '1',
  });
  dynamics.animate(this.pinWrap, {
    translateY: 0,
    scaleY: 1.0,
  }, {
    type: dynamics.gravity,
    duration: 1800,
  });

  dynamics.stop(this.pin);
  dynamics.css(this.pin, {
    'transform': 'none',
  });
  dynamics.animate(this.pin, {
    scaleY: 0.8
  }, {
    type: dynamics.bounce,
    duration: 1800,
    bounciness: 600,
  })

  dynamics.stop(this.pinShadow);
  dynamics.css(this.pinShadow, {
    'transform': 'scale(0,0)',
  });
  dynamics.animate(this.pinShadow, {
    scale: 1,
  }, {
    type: dynamics.gravity,
    duration: 1800,
  });
}

CustomMarker.prototype.animateBounce = function() {
  dynamics.stop(this.pinWrap);
  dynamics.css(this.pinWrap, {
    'transform': 'none',
  });
  dynamics.animate(this.pinWrap, {
    translateY: -30
  }, {
    type: dynamics.forceWithGravity,
    bounciness: 0,
    duration: 500,
    delay: 150,
  });

  dynamics.stop(this.pin);
  dynamics.css(this.pin, {
    'transform': 'none',
  });
  dynamics.animate(this.pin, {
    scaleY: 0.8
  }, {
    type: dynamics.bounce,
    duration: 800,
    bounciness: 0,
  });
  dynamics.animate(this.pin, {
    scaleY: 0.8
  }, {
    type: dynamics.bounce,
    duration: 800,
    bounciness: 600,
    delay: 650,
  });

  dynamics.stop(this.pinShadow);
  dynamics.css(this.pinShadow, {
    'transform': 'none',
  });
  dynamics.animate(this.pinShadow, {
    scale: 0.6,
  }, {
    type: dynamics.forceWithGravity,
    bounciness: 0,
    duration: 500,
    delay: 150,
  });
}

CustomMarker.prototype.animateWobble = function() {
  dynamics.stop(this.pinWrap);
  dynamics.css(this.pinWrap, {
    'transform': 'none',
  });
  dynamics.animate(this.pinWrap, {
    rotateZ: -45,
  }, {
    type: dynamics.bounce,
    duration: 1800,
  });

  dynamics.stop(this.pin);
  dynamics.css(this.pin, {
    'transform': 'none',
  });
  dynamics.animate(this.pin, {
    scaleX: 0.8
  }, {
    type: dynamics.bounce,
    duration: 800,
    bounciness: 1800,
  });
}

$(document).on('click', '.link', function() {
  var $this = $(this);
  $this.addClass('current').siblings().removeClass('current');
  
  var pos = $this.data('position'); 
  changeMarkerPos(pos);
});

function initialize() {
  var styles = [{
    stylers: [{
      saturation: 0
    }]
  }];

  var styledMap = new google.maps.StyledMapType(styles, {
    name: "Styled Map"
  });

  var mapProp = {
    center: new google.maps.LatLng(55.720932, 37.600693),
    zoom: 17,
    panControl: false,
    zoomControl: true,
    mapTypeControl: false,
    scaleControl: true,
    streetViewControl: false,
    overviewMapControl: false,
    rotateControl: true,
    scrollwheel: false,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  map = new google.maps.Map(document.getElementById("map_canvas"), mapProp);

  map.mapTypes.set('map_style', styledMap);
  map.setMapTypeId('map_style')

  marker = new CustomMarker({
    position: new google.maps.LatLng(55.720932, 37.600693)
  });

  google.maps.event.addListener(marker, 'click', function(e) {
    marker.animateWobble();
  });
  $('#drop').on('click', function(e) {
    marker.animateDrop();
  });

  $('#wobble').on('click', function(e) {
    marker.animateWobble();
  });

  $('#bounce').on('click', function(e) {
    marker.animateBounce();
  })
  marker.setMap(map);
  map.panTo(marker.position);
}

function changeMarkerPos(pos) {
  var myLatLng = new google.maps.LatLng(pos[0], pos[1]);
  marker.position = myLatLng;

  map.panTo(myLatLng);
}

$(function(){
 $("#toggler").on("click", function(){
  $(".popup-credit").show();
 })

 
})


google.maps.event.addDomListener(window, 'load', initialize);
              
            
!
999px

Console