Inside, a custom widget I'm working on I would like select a feature in the map and an associated popup to open up, all based on user selection in a list of records. This is what I've got:
showFeature : function(featureSet){
this.inherited(arguments);
this.map.graphics.clear();
var resultFeatures = featureSet.features;
graphic = resultFeatures[0];
var symbol = new SimpleFillSymbol();
symbol.setColor(new Color([255,0,51,0.5]));
graphic.setSymbol(symbol);
this.map.graphics.add(graphic);
var infoTemplate = new InfoTemplate("...some configuration here ...");
graphic.setInfoTemplate(infoTemplate);
this.map.infoWindow.setFeatures([graphic]);
this.map.infoWindow.show(graphic.geometry);
When this runs, the feature is selected, highlighted - in other words, the graphic makes it onto the map.
But there is no sign of the Popup, except for this message in Dev Tools:
I do see the PopupManager.js in my app's folder but I have no idea what is role is. The app contains a number OTB widgets that someone else on my team configured. So I'm suspecting there is another Popup template configured and my widget is getting confused. Any pointers or references to some documentation are appreciated.
Arne,
Well, without my taking another look, you've probably answered my question.
Thanks, as always.
Arne,
Then just get the geometries extent center then.