Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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

              
                <script src="https://maps.googleapis.com/maps/api/js"></script>
<div id="customMap" class="custom-map"></div>
              
            
!

CSS

              
                .custom-map {
    height: 500px;
    width: 1500px;
}
              
            
!

JS

              
                // Initialize function
function initialize() {
    // Starting location
    var location = new google.maps.LatLng(52.934658, -1.131450);
    
    // Starting map options
    var mapOptions = {
          center: location,
          zoom: 12
    };
    
    // Create a new Google Maps Object passing in the element and custom options
    var map = new google.maps.Map(document.getElementById('customMap'), mapOptions);
    
    
    // State custom styles
    var styles = [
      {
        "featureType": "landscape",
        "stylers": [
          { "color": "#D8E146" }
        ]
      },{
        "featureType": "water",
        "stylers": [
          { "color": "#80c1e6" }
        ]
      },{
        "featureType": "poi.business",
        "stylers": [
          { "color": "#abdc89" }
        ]
      }
    ]
    
    // Set custom styles on map
    map.setOptions({styles: styles});
}

// Event Listener to call the function once the HTML elements on the page have loaded
google.maps.event.addDomListener(window, 'load', initialize);
              
            
!
999px

Console