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.

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


		<textarea id="outDiv" wrap="off" style="margin-top: 5px; width:100%; height: 850px"></textarea>    





    // creates a new DAB instance with the given endpoint
    var dab =  GIAPI.DAB('','v28daf7005b0640088ff0723c15bed7b9');

    // defines discover response callback function
    var onResponse = function(response){

      // retrieves the result set
      // only one result set is expected (discover not expanded)     
      var resultSet = response[0];


        $('#outDiv').append("Error occurred: "+resultSet.error); 

      // retrieves the paginator   
      var paginator = resultSet.paginator;

      // prints the result set
      $('#outDiv').append("--- Result set ---\n\n");

      // the current paginator page (the first of the result set)    
      var page =;

      // printing page nodes
      $('#outDiv').append("\n--- Nodes of first result set page ---\n\n"); 


        // retrieving the next page node
        var node =;

        // retrieving the node report
        var report =;     


    // discover constraints
    var constraints = {

      "where": {
        "south": 0,
        "west": -103,
        "north": 35,
        "east": -35

      "when": {
        "from": "2000-01-01",
        "to": "2014-12-12"

      "what": "temperature"               

    constraints = {};

    // setting maximum page size
    var options = {

      "pageSize": 5,
      "spatialRelation" : GIAPI.SpatialRelation.OVERLAPS           

    var onStatus = function(statusList) {


        for (var i = 0; i < statusList.length; i++) {
          var s = statusList[i];
          var title = s.title();

          console.log("Title: " + s.title());
          console.log("Message: " + s.message());
          console.log("Phase: " + s.phase());
          console.log("Progress: " + s.progress());

    // start discover, constraints, options, onStatus);