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.


                	<div id="google-map"></div>


                #google-map {


                var data = [
  {country: 'France', name: 'Paris', lat: 48.8589507, lng: 2.2775175},
  {country: 'France', name: 'Melun', lat: 48.5421645, lng: 2.6377199},
  {country: 'France', name: 'Lyon', lat: 45.7580101, lng: 4.8001017},
  {country: 'Germany', name: 'Berlin', lat: 52.5076682, lng: 13.2860632},
  {country: 'Germany', name: 'Baden Baden', lat: 48.7574219, lng: 8.1443686},
  {country: 'United Kingdom', name: 'Londres', lat: 51.5287718, lng: -0.2416803},
  {country: 'United Kingdom', name: 'Bristol', lat: 51.468575, lng: -2.6607488},
  {country: 'United Kingdom', name: 'Plymouth', lat: 50.3888309, lng: -4.1824949}

function initMap() {
  var map = new google.maps.Map(document.getElementById('google-map'), {
    center: {lat: 46.52863469527167, lng: 2.43896484375},
    zoom: 3

  // Save Markers by location
  var placeMarkerList = {};

  // Checks every place
  for (var i = 0; i < data.length; ++i) {
    var place = data[i];
    var latLng = new google.maps.LatLng(, place.lng);

    if(!placeMarkerList.hasOwnProperty( {
      placeMarkerList[] = [];
    // Creates the marker and save it in place marker list
    var marker = new google.maps.Marker({
      position: latLng

  // Parse every country to display a cluster for the country
  for (var country in placeMarkerList) {
    if (placeMarkerList.hasOwnProperty(country)) {
      var markerCluster = new MarkerClusterer(map, placeMarkerList[country], {
        imagePath: ''