AnsweredAssumed Answered

Web page with legend and popups not working

Question asked by rcostley_CPYInc on Jan 27, 2017
Latest reply on Jan 27, 2017 by thejus.kambi

Hi! 

I'm creating a web map with Javascript 3.19 with the legend widget and popups. I can get the Legend to work with my data, but when I add the code for the pop ups the map and legend disappear. Am I missing something?

<script>
  var map;
  require([
    "esri/map""esri/dijit/Legend", "esri/dijit/Popup", "esri/dijit/PopupTemplate", "esri/InfoTemplate", "esri/layers/FeatureLayer",
    "dojo/_base/array", "dojo/parser",
    "dijit/layout/BorderContainer", "dijit/layout/ContentPane",
    "dijit/layout/AccordionContainer", "dojo/domReady!"
  ], function(
    MapLegend, Popup, PopupTemplate, InfoTemplate, FeatureLayer,
    arrayUtils, parser
  ) {
    parser.parse();

    map = new Map("map", {
      basemap:"satellite",
      center: [-98.157, 31.029],
      zoom: 8,
        infoWindow: Popup
    });

    var template = new PopupTemplate({
          title: "{UNITNAME}"
      });

Outcomes