AnsweredAssumed Answered

displaying infotemplate on query

Question asked by petergondi on Mar 19, 2018
Latest reply on Nov 26, 2018 by KSchroeder-esristaff

how can i display an infotemplate while zooming to a point on a map after doing a query on a feature layer using a result stored in local storage

var terminal= localStorage.getItem('terminal');
var info= new InfoTemplate({title:"Name"});
var queryTask = new QueryTask("",{mode:FeatureLayer.MODE_ONDEMAND,

var query = new Query();
query.returnGeometry = true;
query.outFields = ["*"];
query.where = "Name = '" + terminal + "'";
queryTask.execute(query, showResults);

function showResults(results) {
var resultCount = results.features.length;
for (var i = 0; i < resultCount; i++) {
//Zoom to line extent
var geom = results.features[i].geometry;
//Zoom to line extent

map.centerAndZoom(geom, 19);


the query zooms to the point fetched from the local storage but does not display the infotemplate