cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <div id="myMap"></div>
<div class="alert">Google Maps changed their APIs and that's the reason why this pen doesn't work. I promise I'll try to fix it ASAP.
Thank you. :-(</div>
            
          
!
            
              html, body, #myMap{
  width: 100%;
  height: 100%;
  font-family: sans-serif;
}
.alert{
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 1rem;
  
}
.label {
  box-sizing:border-box;
  background: #05F24C;
  box-shadow: 2px 2px 4px #333;
  border:5px solid #346FF7;
  height: 20px;
  width: 20px;
  border-radius: 10px;
  -webkit-animation: pulse 1s ease 1s 3;
  -moz-animation: pulse 1s ease 1s 3;
  animation: pulse 1s ease 1s 3;
}

/* ANIMATIONS */
@-webkit-keyframes pulse {
 40% {
    -webkit-transform: scale(2);
    -moz-transform: scale(2);
    transform: scale(2);
  }

  100% {
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    transform: scale(1);
  }
}
@-moz-keyframes pulse {
 40% {
    -webkit-transform: scale(2);
    -moz-transform: scale(2);
    transform: scale(2);
  }

  100% {
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    transform: scale(1);
  }
}
@keyframes pulse {
  40% {
    -webkit-transform: scale(2);
    -moz-transform: scale(2);
    transform: scale(2);
  }

  100% {
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    transform: scale(1);
  }
}
            
          
!
            
              //External resources:
//https://maps.google.com/maps/api/js?sensor=false
//https://google-maps-utility-library-v3.googlecode.com/svn-history/r391/trunk/markerwithlabel/src/markerwithlabel.js

function init() {
  
  var mapOptions = {
      zoom: 8,
      center: new google.maps.LatLng(40.417181, -3.700823),
      mapTypeId: google.maps.MapTypeId.ROADMAP,
      disableDefaultUI: true
  };
  
  var myMap = new google.maps.Map(document.getElementById('myMap'), mapOptions);
  
  var marker = new MarkerWithLabel({
    position: myMap.getCenter(),
    icon: {
      path: google.maps.SymbolPath.CIRCLE,
      scale: 0, //tamaño 0
    },
    map: myMap,
    draggable: true,
    labelAnchor: new google.maps.Point(10, 10),
    labelClass: "label", // the CSS class for the label
  });
}
google.maps.event.addDomListener(window, 'load', init);

            
          
!
999px
Loading ..................

Console