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. 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

JavaScript

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

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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <div id="map_container">
	<div id="map"></div>
</div>
              
            
!

CSS

              
                body { 
  margin-top: 2rem;
  background: #111;
}
#map_container {
	position: relative;
	padding-top: 50%;
  width: 95%;
  height: 80%;   
  margin: 0 auto;
}
#map {
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
}

#meter {
  font-size: 20px;
}

#info {
  font-size: 12.8px;
}
              
            
!

JS

              
                // Most Polluting coal power plants: sources
//source 2007 - also 2013
//https://en.wikipedia.org/wiki/List_of_least_carbon_efficient_power_stations

//source 2012
//http://www.airclim.org/acidnews/europe%E2%80%99s-most-polluting-power-plants

var i=0;
var j=0;
var k=0;
var l=0;
var m=0;
var n=0;
var o=0;
var p=0;
var q=0;
var r=0;
var s=0;
var t=0;

		function augmenter() {
      //there are 525600 minutes in a year
      //there are 60 000ms in a minute
      
      //Bełchatów: 35 000 000 tons/year = 67 Tons/minute = 11kg per 10 milliseconds
			i+=11;
      //Niederaußem 28 100 000 tons/year = 53.4 Tons/minute = (8.9) 9 kg per 10 milliseconds
      j+=9;
      //Janchwalde 23 500 000 tons/year = 44.7 Tons/minute = (7.4) 7 kg per 10 milliseconds
      k+=7;
      //Drax 20 800 000 tons/year = 39.6 Tons/minute = (6.6) 7 kg per 10 milliseconds
      l+=7;
      //Eschweiler 19 900 000 tons/year =  37.8 Tons/minute = (6.3) 6 kg per 10 milliseconds
      m+=6;    
      //Neurath 16 900 000 tons/year =  32.15 Tons/minute = (5.3) 5 kg per 10 milliseconds
      n+=5;        
      //Boxberg 15 100 000 tons/year =  28.7 Tons/minute = (4.78) 5 kg per 10 milliseconds
      o+=5;             
      //Frimmersdorf 14 400 000 tons/year =  27.39 Tons/minute = (4.56) 5 kg per 10 milliseconds
      p+=5;      
      //Agios Dimitrios 14 300 000 tons/year = 27.2 Tons/minute = (4.53) 5 kg per 10 milliseconds
      q+=5;
      //Lippendorf 12 500 000 tons/year =  23.78 Tons/minute = (3.9) 4 kg per 10 milliseconds
      r+=5;      
      //Schwarze Pumpe 11 100 000 tons/year =  21 Tons/minute = (3.52) 4 kg per 10 milliseconds
      s+=5;      
      //Kozienice 11 100 000 tons/year =   21 Tons/minute = (3.52) 4 kg per 10 milliseconds
      t+=5;      

			document.getElementById("meter").innerHTML = numberWithCommas(i) +" kg of CO2";
      document.getElementById("meter2").innerHTML = numberWithCommas(j) +" kg of CO2";
		}
		setInterval("augmenter()", 10);

function numberWithCommas(x) {
    return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
}

function initialize() {
	var myLatlng = new google.maps.LatLng(51.26446,19.3149136),
  //Bełchatów:
	mapOptions = {
		zoom: 5,
		center: myLatlng,
		mapTypeId: google.maps.MapTypeId.ROADMAP
		}
  
var map = new google.maps.Map(document.getElementById('map'), mapOptions);
var contentString = 'Bełchatów COAL station<div id="info">Realtime CO2 emissions<BR><BR></div>'+'<div id="meter">0</div>'+
    
    '<div><p> </p><img style="height:100px;width:150px;" src="https://i.guim.co.uk/img/static/sys-images/Guardian/Pix/pictures/2009/7/22/1248295726672/Belchatow-Power-Plant-001.jpg?width=620&quality=85&auto=format&fit=max&s=4bfb86c1689d1fdf9da9fd666028a26f" /></div>'
    
    ;
var infowindow = new google.maps.InfoWindow({
	content: contentString,
	maxWidth: 500
});

var marker = new google.maps.Marker({
	position: myLatlng,
  map: map,
  title: 'Bełchatów - 67 Tons per minute'
});

var image2 = 'https://i.ibb.co/YNrYvvn/factory.png';      
 
var marker2 = new google.maps.Marker({
    position: {lat: 50.9885742, lng: 6.6512587},
    map: map,
    title: 'Niederaußem - 53 Tons per minute',
    icon: image2
});
  
  var marker3 = new google.maps.Marker({
    position: {lat: 51.845007, lng: 14.3827406},
    map: map,
    title: 'Janchwalde - 45 Tons per minute',
    icon: image2
});

  var marker4 = new google.maps.Marker({
    position: {lat: 53.7398014, lng: -1.0190999},
    map: map,
    title: 'Drax - 40 Tons per minute',
    icon: image2
});
  
    var marker5 = new google.maps.Marker({
    position: {lat: 50.839018, lng: 6.3199137},
    map: map,
    title: 'Eschweiler - 37 Tons per minute',
    icon: image2
});
    
  var marker6 = new google.maps.Marker({
   position: {lat: 51.0365125, lng: 6.6311072},
   map: map,
   title: 'Neurath - 32 Tons per minute',
    icon: image2
});    
  
var marker7 = new google.maps.Marker({
    position: {lat: 51.4197514, lng: 14.5667134},
    map: map,
    title: 'Boxberg - 28 Tons per minute',
    icon: image2
});  
  
 var marker8 = new google.maps.Marker({
    position: {lat: 51.0556704 , lng: 6.5755541},
    map: map,
    title: 'Frimmersdorf - 27 Tons per minute',
    icon: image2
});  

var marker9 = new google.maps.Marker({
    position: {lat: 40.3938934, lng: 21.9271724},
    map: map,
    title: 'Dimitrios - 27.2 tons per minute',
    icon: image2
});
  
  var marker10 = new google.maps.Marker({
    position: {lat: 51.1847, lng: 12.3717162},
    map: map,
    title: 'Lippendorf - 24 Tons per minute',
    icon: image2
});  
  
  var marker11 = new google.maps.Marker({
    position: {lat: 51.5378719, lng: 14.3528131},
    map: map,
    title: 'Schwarze Pumpe - 21 Tons/minute',
    icon: image2
});  
  
  var marker12 = new google.maps.Marker({
    position: {lat: 51.6666299, lng: 21.457623},
    map: map,
    title: 'Kozienice - 21 Tons/minute',
    icon: image2
});  

  
//DRAW TRIANGLE ZONE  
 /*
  var threecities = [
          {lat: 50.8502629, lng: 4.349958}, //bxl
          {lat: 52.3674609, lng: 4.9015571}, //AMS
          {lat: 50.1115032, lng: 8.678641}, //frankfurt
          {lat: 50.8502629, lng: 4.349958}, //bxl
        ];

 var triangle = new google.maps.Polyline({
          path: threecities,
    geodesic: true,
          strokeColor: '#555555',
          strokeOpacity: 10.0,
          strokeWeight: 2
        });

triangle.setMap(map);
  */
//CIRCLE

var cityCircle = new google.maps.Circle({
      strokeColor: '#FF0000',
      strokeOpacity: 0.3,
      strokeWeight: 2,
      fillColor: '#FF0000',
      fillOpacity: 0.1,
      map: map,
      center: {lat: 50.9114825, lng: 6.4689224},
      radius: 180000
    });
  
  
google.maps.event.addListener(marker, 'click', function() {
	infowindow.open(map,marker);
});

  infowindow.open(map,marker);
 
google.maps.event.addDomListener(window, "resize", function() {
	var center = map.getCenter();
	google.maps.event.trigger(map, "resize");
	map.setCenter(center);
	});
}



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

Console