AnsweredAssumed Answered

Adding Popups to an ArcGISDynamicMapLayer

Question asked by gsalvador0 on Aug 30, 2017
Latest reply on Aug 30, 2017 by rscheitlin

Hi all,


I am trying to add a popup to an ArcGISDynamicMapLayer, and I am a little stuck. I can't get the popups to appear, but I'm not getting any errors in the console. I think the error might be when I try to add the intoTemplate to the layer, but I'm not sure. Here is my code: (I've edited it out extra widgets so it is shorter, but I left the requires and declarations)

], function (Map, arcgisUtils,
LayerList, BasemapGallery,
Popup, PopupTemplate,
parser, domConstruct, on, InfoTemplate) {
var popup = new Popup({}, domConstruct.create("div"));
var map = new Map("map", {
basemap: "topo",
center: [-98.40, 29.67], //centers on san antonio
zoom: 11, //zooms to all of bexar county, must be integer
infoWindow: popup
BCADParcelPopup = new InfoTemplate("2016 BCAD Parcels", "");
var infoTemplates = {
infoTemplate: BCADParcelPopup,
layerUrl: url + "/40" //sudocode, i actually have the url as a string here.
var landLayer = new ArcGISDynamicMapServiceLayer(
"id": "Land"
landLayer.setInfoTemplates({ infoTemplates });