title: filter shakemaps by earthquake name (or id)
body: <p>My goal is to be able to toggle shake intensities on / or off (display or hide) <em>individually</em> via either an <code>ID</code> or <code>name</code>... I see options of id and object id available in the data field options in the rest <a href="https://livefeeds.arcgis.com/arcgis/rest/services/LiveFeeds/USGS_Seismic_Data/MapServer/" rel="nofollow noreferrer">doc</a>.. however, I am unsure how to implement... In my below codepen, you can see I am doing a rest call and returning all the shake map data at once... I am trying to return them one at a time per earthquake name or ID... so, I can filter them later "on" or "off"...</p>
  
  <p><a href="https://codepen.io/polpo26/pen/dyGGWzb?editors=1000" rel="nofollow noreferrer">CodePen..</a></p>
  
  <p>Full Code:</p>
  
  <hr>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"&gt;
    &lt;title&gt;ArcGIS JavaScript Tutorials: Add layers to a map&lt;/title&gt;
    &lt;style&gt;
      html, body, #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      }
    &lt;/style&gt;
    &lt;link rel="stylesheet" href="https://js.arcgis.com/4.15/esri/themes/light/main.css"&gt;
    &lt;script src="https://js.arcgis.com/4.15/"&gt;&lt;/script&gt;
  
    &lt;script&gt;
      require([
        "esri/Map",
        "esri/views/MapView",
        "esri/layers/FeatureLayer",
        "esri/widgets/Legend"
      ], function(Map, MapView, FeatureLayer, Legend) {
          var map = new Map({
              basemap: "gray"
          });
  
          var view = new MapView({
              container: "viewDiv",  
              map: map,
              center: [-122, 37],
              zoom: 5            
          });
  
          view.ui.add(
              new Legend({
                  view: view
            }),
              "bottom-left"
          );
  
      // Define a popup for USGS_Seismic_Data_v1
        var popupUSGS = {
          title: "Shake Intensity",
          content: [
            {
              type: "fields",
              fieldInfos: [
              {
                  fieldName: "grid_value",
                  label: "Grid Value"
                },
                {
                  fieldName: "mag",
                  label: "Magnitude"
                },
                {
                  fieldName: "eventTime",
                  label: "Event Time",
                  format: {
                    dateFormat: "short-date-short-time"
                  }
                },
                {
                  fieldName: "updated",
                  label: "Updated",
                  format: {
                    dateFormat: "short-date-short-time"
                  }
                },
                {
                  fieldName: "url",
                  label: "Url"
                }
              ]
            }
          ]
        }
      // USGS_Seismic_Data_v1 feature layer (polygons)
        var SeismicData = new FeatureLayer({
          title: "MMI - Shake Intensity",
          url:  "https://services9.arcgis.com/RHVPKKiFTONKtxq3/arcgis/rest/services/USGS_Seismic_Data_v1/FeatureServer/1/",
             outFields: ["mag","eventTime","url"],
            popupTemplate: popupUSGS
        });
        map.add(SeismicData);
      });
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id="viewDiv"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>