AnsweredAssumed Answered

Popup Template Title in a WebMap

Question asked by jpilbeam on Nov 19, 2018
Latest reply on Nov 19, 2018 by rscheitlin

I'm in 4.9. How can I get the popup to display the title of each field using a Webmap? Right now, when you click the feature in the app the title displays as "Sheet1". 

 

The feature layer in the Webmap is actually "Warming Center".

In the JS (below) I have the Title set up to display the "FACILITY_NAME" field. But, that's not happening. If  I use the Map class instead of a Webmap the title displays in the popup just fine. But, in this case I'd rather user a Webmap.

 

        var webmap = new WebMap({
         portalItem: {
             id: "93b7e42b2ca64790aa2315da5eceaff9"
         }
        });
      /************************************************************
       * Set the WebMap instance to the map property in a MapView.
       ************************************************************/

        var view = new MapView({
          map: webmap,
          container: "viewDiv",
          popup: {
            dockEnabled: true,
            dockOptions: {
              // Disables the dock button from the popup
              buttonEnabled: false,
              // Ignore the default sizes that trigger responsive docking
              breakpoint: false,
            }
          }
        });
        //Popup template
        var template = { // autocasts as new PopupTemplate()
          title: "{FACILITY_NAME}",
          content: [{
            type: "fields",
            fieldInfos: [{
              fieldName: "FACILITY_TYPE",
              label: "Facility Type",
              visible: true,
            }, {
              fieldName: "ADDRESS",
              label: "Address",
              visible: true,
            }, {
              fieldName: "WEBSITE",
              label: "Website",
              visible: true,
            }, {
              fieldName: "PHONE_NUMBER",
              label: "Phone",
              visible: true,
            }, {
              fieldName: "HOURS",
              label: "Hours",
              visible: true,
            }]
          }]
        };
        //Reference the popupTemplate instance in the popupTemplate property of FeatureLayer
        var featureLayer = new FeatureLayer({
          url: "https://services.arcgis.com/fGsbyIOAuxHnF97m/arcgis/rest/services/Warming_Centers_in_and_around_Will_County_IL/FeatureServer/0?token=TBoytrSjk658s73RVxEixBfWiPa_GI5EYBjyRTwYygOilY6kmMaDiHJla-n8ZvLylgt755Owpi4Pvqxk8hzaAM3vfBBx2ueCuCWfenNdfKFxnSEoTfLCTB4kcJqBR1KHJAje4C9tHfcYHJnH1ciTvKBy38vzit7TGUFfVUkQEgXlmhoN4iut9RMll6meOOaUFSa0yPENiXUOxWClJcXzPSe81jiObK3Ecjv4YirstB6GLYanFZ56cEnR66HRwbmB",
          outFields: ["*"],
          popupTemplate: template
        });

 

I haven't found any reference or help explaining this.
WebMap | API Reference | ArcGIS API for JavaScript 4.9 

This sample uses a webmap, but I don't see where they set the Title parameter.
ArcGIS API for JavaScript Sandbox 

Outcomes