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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


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


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.


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.


    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>

  <title>CSVLayer sample</title>
    <link rel="stylesheet" href="">
      html, body, #map {
        height: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
      body {
        background-color: #FFF;
        overflow: hidden;
        font-family: "Trebuchet MS";
    <script src=""></script>
      var map, csv;

      ], function(
        Map, CSVLayer, Color, SimpleMarkerSymbol, SimpleRenderer, ClassBreaksRenderer, InfoTemplate, esriConfig
      ) {
        // Use CORS""); // supports CORS

        // Use proxy if the server doesn't support CORS
        // = "/proxy/";  
        map = new Map("map", {
          basemap: "gray",
          center: [ -60, -10 ],
          zoom: 4 
        csv = new CSVLayer("", {
          copyright: ""
        var orangeRed = new Color([238, 69, 0, 0.5]); // hex is #ff4500
        var symbol = new SimpleMarkerSymbol("solid", 15, null, orangeRed);
        var renderer = new ClassBreaksRenderer(symbol, "mag");
        renderer.addBreak(0.0, 3.0, new SimpleMarkerSymbol().setColor(new Color([0, 200, 0, .5])));
        renderer.addBreak(3.1, 5.0, new SimpleMarkerSymbol().setColor(new Color([0, 0, 200, .5])));
        renderer.addBreak(5.1, Infinity, new SimpleMarkerSymbol().setColor(new Color([168, 168, 168, 1])));

        // var renderer = new SimpleRenderer(marker);
        var template = new InfoTemplate("${type}", "${mag}");

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