0

I would like to add a my popup work. I am confused which is which, infoWindow, popupTemplate and infoWindow. I have tried putting popupTemplate together but it does not load. The basemap works alright but does not load the load the layer.

require([
"esri/map",
"esri/layers/FeatureLayer",
"esri/dijit/Popup",
"esri/dijit/PopupTemplate",
"esri/dijit/InfoTemplate",//new addition for infoTemplate
"dojo/domReady!"
 ],
 function(Map, FeatureLayer, Popup, PopupTemplate, InfoTemplate) {
//create map
var map = new Map("map", {
 basemap: "hybrid",
 center: [-0.345, 5.543],
 zoom: 19
});
//info template defination
var infoTemplate = new InfoTemplate("${OBJECTID}", "${*}");
var featureLayer = new FeatureLayer({
 url: "http://192.168.1.2/ndigis/rest/services/map/GSMA/FeatureServer/3",
 outFields: ["*"],
 infoTemplate: infoTemplate
});
map.addLayer(featureLayer);
});

based on the implementation here https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=renderer_class_breaks.

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Oct 5, 2016 at 17:58
2
  • 1
    why is url: set to server1url/rest when the comment has a local ip? Are you sure that isn't the problem? Commented Oct 5, 2016 at 19:05
  • 1
    when you copy/paste the url of the featureLayer into a new browser tab, is it accessible? Commented Oct 5, 2016 at 21:18

1 Answer 1

1

The module name for Info Template is :

"esri/InfoTemplate"

So change

"esri/dijit/InfoTemplate" to "esri/InfoTemplate"
answered Oct 6, 2016 at 12:11
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.