two service areas

by Alex Azuero

HTML

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <!--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>Basic Service Area with Slider</title>
  
  <link rel="stylesheet" href="http://js.arcgis.com/3.8/js/dojo/dijit/themes/claro/claro.css">
  <link rel="stylesheet" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
  <style> 
    body,html,#main{margin:0;padding:0;height:100%;width:100%;}
  </style> 
  
  <script>var dojoConfig = { parseOnLoad: true };</script> 
  <script src="http://js.arcgis.com/3.8/"></script>
  <script>
    dojo.require("esri.map");  
    dojo.require("esri.tasks.servicearea");  
    dojo.require("dijit.dijit");
    dojo.require("dijit.layout.BorderContainer");
    dojo.require("dijit.layout.ContentPane");
    dojo.require("dijit.form.HorizontalSlider");
    dojo.require("dijit.form.HorizontalRuleLabels");
    dojo.require("dijit.form.HorizontalRule");

    var map, serviceAreaTask, params, clickpoint, features, facilities;

    function init() {     
      //This sample requires a proxy page to handle communications with the ArcGIS Server services. You will need to  
      //replace the url below with the location of a proxy on your machine. See the 'Using the proxy page' help topic 
      //for details on setting up a proxy page.
      esri.config.defaults.io.proxyUrl = "/proxy";
      
      map = new esri.Map("map", { 
        basemap: "streets",
        center: [-122.447, 37.781],
        zoom: 15
      });

      dojo.connect(map, "onClick", mapClickHandler);

      params = new esri.tasks.ServiceAreaParameters();
      params.defaultBreaks= [1];
      params.outSpatialReference = map.spatialReference;
      params.returnFacilities = false;
      
      serviceAreaTask = new...