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.

              #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.lat, place.lng);

    if(!placeMarkerList.hasOwnProperty(place.country)) {
      placeMarkerList[place.country] = [];
    // 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: 'https://googlemaps.github.io/js-marker-clusterer/images/m'

Loading ..................