JSFiddle - React, Tailwind, and code Playground

by dbouwman

HTML

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
    <!--The viewport meta tag is used to improve the presentation and behavior of the samples 
      on iOS devices-->
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
    <title>Dynamic Map Service Layer with Custom Projection and Extent</title>

    <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dijit/themes/claro/claro.css">
    <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/esri/css/esri.css">
    
    <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/"></script>
    <script>
      dojo.require("esri.map");
      dojo.require("esri.dijit.Measurement");

      function init() {
        esri.config.defaults.geometryService = new esri.tasks.GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");
        var customExtentAndSR = new esri.geometry.Extent(-20037506,-9823074,20037506,10214431,new esri.SpatialReference({"wkid":54052}));
        //create map with new custom spatial reference and extent.  The map will be in the Goode Homolosine Land projection
        var map = new esri.Map("map", { extent: customExtentAndSR });
        
        dojo.connect(map, "onLoad", function(){
          var measurement = new esri.dijit.Measurement({
            map: map
          }, dojo.byId('measurementDiv'));
          measurement.startup();        
        });
        
        //map service layer has a default spatial reference of 4326.
        var mapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer");
        map.addLayer(mapServiceLayer);
        var fsLayer

      }

      dojo.ready(init);
    </script>

  </head>
  <body...