AnsweredAssumed Answered

Change geometry in

Question asked by jpilbeam Champion on Aug 17, 2018
Latest reply on Aug 17, 2018 by jpilbeam

I'm attempting to create a simple app that has a point featurelayer with some attributes. When selecting a point to view its popup info, how can I also make it become highlighted?


This link to sample code does something similar in that it draws a border on a polygon:

PopupTemplate with promise | ArcGIS API for JavaScript 4.8 


This sample code does basically what I want in that when you select a point it becomes highlighted and has a popup:

CSVLayer - Project points on the fly | ArcGIS API for JavaScript 4.8 


Here's what I have so far:

<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Intro to Popups</title>
  html, body, #viewDiv {
  padding: 0;
  margin: 0;
  height: 100%;
  width: 100%;
  #layerToggle {
  top: 20px;
  right: 20px;
  position: absolute;
  z-index: 99;
  background-color: white;
  border-radius: 8px;
  padding: 10px;
  opacity: 0.75;

<link rel="stylesheet" href="">
<script src=""></script>

      "esri/layers/FeatureLayer", //Require the FeatureLayer module
    Map, MapView, FeatureLayer, dom, on
  ) {

    var warming = new FeatureLayer({
      url: "",
      id: "warming",
      minScale: 5000000
   var boundary = new FeatureLayer({
     id: "boundary",
     minScale: 5000000
      var map = new Map({
      basemap: "streets-night-vector",
      layers: [warming, boundary]
    var view = new MapView({
      container: "viewDiv",
      map: map,
      scale: 500000,
      center: [-88, 41.5]
      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: "PHONE_NUMBER",
            label: "Phone",
            visible: true,
          }, {
            fieldName: "HOURS",
            label: "Hours",
            visible: true,
        var featureLayer = new FeatureLayer({
        url: "",
        outFields: ["*"],
        popupTemplate: template,
        dockEnabled: true,


  <div id="viewDiv"></div>



And here is a seemingly relevant snippet from line 137 of the first sample code that I can't properly modify:"selectedFeature", function(e) {
          if (e && e.geometry) {
              geometry: e.geometry,
              symbol: {
                type: "simple-fill",
                style: "none",
                outline: {
                  color: "#6600FF",
                  width: 2