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.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.


  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> 
  <title>Google Maps Multiple Markers</title> 
  <script src=""></script>
  <div class=row>
    <h2>The Heroes</h2>
      <!-- >
      <span style="background-color: #ffcdd2">
      Supporter / 5 USD 
      <span style="background-color: #FFCC80">
      Hero / 10 USD
      <span style="background-color: #E6EE9C">
      Contributor / 25 USD
  <span style="background-color: #80DEEA">
      Champion / 50 USD
  <span style="background-color: #64B5F6">
      Star / 100 USD
  <span style="background-color: #0e7feb"> 
      All star / 200 USD
      Click the spots to see the Backers
  <div class="row text-center centered">
    <div id="map"></div>
  <div class=row>
    <p>This is footer<p>


  text-align: center;
  margin: auto;

  /*width: 500px;*/ 
  height: 450px;

  display: block;
  margin: auto;
  width: 90%;


                // Define your locations: HTML content for the info window, latitude, longitude
    var locations = [
      ['<h4>Obama</h4><img src="" height="100" width="100">', -33.890542, 151.274856],
      ['<h4>Jared Leto</h4><img src="" height="100" width="100">', -33.923036, 151.259052],
      ['<h4>Amanda Palmer</h4><img src="" height="100" width="100">', 40.6451594,-74.0850828],
      ['<h4>Random Girl</h4><img src="" height="100" width="100">', -33.80010128657071, 151.28747820854187],
      ['<h4>Old Man</h4><img src="" height="100" width="100">', -33.950198, 101.259302],
      ['<h4>RadioHead </h4> <img src="" height="100" width="100">', 30.950198, 131.259302],
       ['<h4>Oview </h4> <img src="" height="100" width="100">', 52.3105386,4.7],
      ['<h4>Smile</h4><img src="" height="100" width="100">', -23.950198, 151.259302]
    // Setup the different icons and shadows
    var iconURLPrefix = '';
    var icons = [
      iconURLPrefix + 'red-dot.png',
      iconURLPrefix + 'green-dot.png',
      iconURLPrefix + 'blue-dot.png',
      iconURLPrefix + 'orange-dot.png',
      iconURLPrefix + 'purple-dot.png',
      iconURLPrefix + 'pink-dot.png',      
      iconURLPrefix + 'yellow-dot.png'
    var iconsLength = icons.length;

    var map = new google.maps.Map(document.getElementById('map'), {
      zoom: 2,
      center: new google.maps.LatLng(38.219139, -171.521267),
      mapTypeId: google.maps.MapTypeId.ROADMAP,
      mapTypeControl: false, /* option for satelate view*/
      streetViewControl: false,
      panControl: false,
      zoomControlOptions: {
         position: google.maps.ControlPosition.LEFT_BOTTOM

    var infowindow = new google.maps.InfoWindow({
      maxWidth: 205

    var markers = new Array();
    var iconCounter = 0;
    // Add the markers and infowindows to the map
    for (var i = 0; i < locations.length; i++) {  
      var marker = new google.maps.Marker({
        position: new google.maps.LatLng(locations[i][1], locations[i][2]),
        map: map,
        icon: icons[iconCounter]


      google.maps.event.addListener(marker, 'click', (function(marker, i) {
        return function() {
, marker);
      })(marker, i));
      // We only have a limited number of possible icon colors, so we may have to restart the counter
      if(iconCounter >= iconsLength) {
      	iconCounter = 0;

    function autoCenter() {
      //  Create a new viewpoint bound
      var bounds = new google.maps.LatLngBounds();
      //  Go through each...
      for (var i = 0; i < markers.length; i++) {  
      //  Fit these bounds to the map