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.

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

            
                     <h1>WORLD MAP OF METEORITES</h1>
       <h4>FIRST TEN LABELED -- CODEPEN LIMITATION TO NO MORE THAN 3000 METEORITES !!!</h4>
        <div class="rame">    
            <div class="wholecontent">

            </div>
        </div>
        <div class="button">
               
                <button id="click">LOAD MAP DATA</button>
                
                <div>
                    <p>PLEASE CHOOSE WISELY QUANTITY OF METEORITES, MORE MEANS LONGER RENDERING</p>
                </div>
                
       
        </div>
        
            
          
!

CSS

            
              @import url(https://fonts.googleapis.com/css?family=Luckiest+Guy);
* {
    margin:0;
    padding:0;
    
   
}

body,html {
    height: 100vh;
    background-color:aqua;
   text-align: center;
}

h1,h4 {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
    font-family: 'Luckiest Guy', Helvetica, sans-serif;
    text-shadow: 4px 4px 0px #ba3a1a; 
    letter-spacing: 0.1rem;
    color:floralwhite;    
}

.wholecontent {
    position: relative;
    background: url("http://res.cloudinary.com/trodison/image/upload/v1510508038/World_map_with_nations_lcx7r1.svg"); 
    
    background-repeat: no-repeat;
    background-size: contain;
    
    
    width: 1377px;
    height: 692px; 
   
}
.button {
    padding: 3rem;
    padding-top: 1rem;
    text-align: center;
}

#click {
    display: inline-block;
    padding: 10px 20px 10px 20px;
    background-color: cadetblue;
    border: 1px solid red;
    margin-bottom: 1rem;
}

.met {
    position: absolute;
    border: 1px solid red;
}

.drawLine {
    position:absolute;
    font-weight: bold;
    text-decoration: underline;
    min-width: 190px;
    min-height: 15px;
    color:forestgreen;
    padding: 5px;
    border: 1px solid red;
    background-color: whitesmoke;
    text-align: center;
    opacity: 0.8;
}

.rame {
    padding: 10px;
    border: 1px solid gray;
    display: inline-block;
    margin: 0 auto;
    padding-bottom: 2rem;
    border-radius: 5px;
}

#status {
    position: absolute;
    padding: 10px 20px 10px 20px;
    border: 1px solid grey;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
}

#refreshpage {
     display: inline-block;
    padding: 10px 20px 10px 20px;
    background-color: cadetblue;
    border: 1px solid red;
    margin-top: 1rem;
    margin-bottom: 1rem;   
}

div > p {
    font-weight: bold;
    color:darkolivegreen;
    letter-spacing: .05rem;
}

#myProgress {
  width: 100%;
  background-color: #ddd;
}

#myBar {
  width: 0;
  height: 30px;
  background-color: #4CAF50;
}
            
          
!

JS

            
              var meteo = [];
var pictureWidth = 1377;
var pictureHeight = 692;
var startLong = -180;
var startLat = -90;
var endLong = 180;
var endLat = 90;

var divText = "";

var temp = "";

var tableData = "";
  
var countPage = 0;


$(document).ready(function() {

  $("#click").click(function() {
      console.log(countPage);
      
      if(countPage > 0) {
        // reloadPage();
         // myFunction();
          $(".met").remove();
          $(".drawLine").remove();
          $("#status").remove();
         }
      
     //else  {
      var provideNumber;
      
      
                provideNumber = prompt("Please provide Quantity of Meteorites you want on the MAP \n" +  "Numbers between 1 <> 34513 \n" + "10K Takes about 2 minutes to Load whereas 35000 10<>15 minutes" , "1000");

      while(provideNumber < 0 || provideNumber > 34513 || isNaN(provideNumber)) {
            var provideNumber = prompt("PROVIDE RIGHT NUMBER 1 <> 34513 " , "1000");
            }
      
      $(".wholecontent").append('<div id="status">Loading Picture Data</div>');

      var startTime = new Date().getTime();
      
$.getJSON("https://raw.githubusercontent.com/LightTest/poland-meteor/master/meteorites-in-world.json", function(json){
    meteo = json.slice();
                     
               
                console.log(meteo.length);
     for(i = 0; i < provideNumber; i++) {
     
        if( meteo[i][2] != 1 && meteo[i][3] != 1) {

if(i < 10){
         divText = '<div class="drawLine">' + 'Name: ' + meteo[i][0] +'</div>';
        $(".wholecontent").prepend(divText);   
        }
 //       $(".wholecontent").prepend('<div class="drawLine"></div>');       
        $(".wholecontent").prepend('<div class="met"></div>');
        $(".met:first-child").css("width", Math.sqrt(meteo[i][2])/50);
        $(".met:first-child").css("height", Math.sqrt(meteo[i][2])/50);

            
        $(".met:first-child").css("background-color", "rgba(255,0,255,0.3)");
        $(".met:first-child").css("border-radius", "50%");

        $(".met:first-child").css("left", (convertToSvgWidth(meteo[i][4],startLong , endLong , pictureWidth)));         
        $(".met:first-child").css("bottom", (convertToSvgHeight(meteo[i][3],startLat, endLat, pictureHeight)));        
        $(".met:first-child").css("transform", "translate(-50%,50%)"); 
// To draw a line
            
             if(i < 10) {
                 
        $(".drawLine:nth-child(2)").css("left", (convertToSvgWidth(meteo[i][4],startLong , endLong , pictureWidth)+ (Math.sqrt(meteo[i][2])/50)/2  )  );         
        $(".drawLine:nth-child(2)").css("bottom", (convertToSvgHeight(meteo[i][3],startLat, endLat, pictureHeight))); 
         divText = "";  
                }  
            
                   
    }
 
         
    }
        $("#status").fadeOut(200);  
    //showTimeLoading(startTime);                
    countPage = countPage +1;
            });  //}
//$("#click").prop("disabled",true); 
      
});
 

    
});
    
function convertToSvgWidth(yourLong, startLong , endLong , pictureWidth ) {
    
    return (yourLong-startLong)*(pictureWidth/(endLong-startLong));
    
}

function convertToSvgHeight(yourLat, startLat, endLat, pictureHeight){
    return (yourLat-startLat)*(pictureHeight/(endLat-startLat));
}

function reloadPage() {
    location.reload();
}
            
          
!
999px

Console