AnsweredAssumed Answered

How to display popup on layer 'selection-complete' event

Question asked by alterwiel on Aug 23, 2015
Latest reply on Aug 24, 2015 by kenbuja

I'm trying to get a popup to display on a selection-complete event of a feature layer. I'm having a problem where at the line to show the window I get a "Cannot read property 'toScreen' of undefined" error in the console. Does anyone know of a better way of showing a popup from a 'selection-complete' event? Thanks.


featureLayer.on("selection-complete", showInfo);

function showInfo (event) {





Message was edited by: Andrew Terwiel


I have it working now. Code snippets below.


postCreate: function () {


            this._config = this.config;


   = this._customPopup;

  "click", this._showRoadInfo);



deferred = widget._roadFeatureLayer.selectFeatures(layerQuery,

            FeatureLayer.SELECTION_NEW, function (selected) {



            widget._zoomToRoad(selected, widget);

            var mpPt = selected[0].geometry.getExtent().getCenter();//new Point(-122, 45.6); 

            var scrPt =;                    "click", { selected: selected, map: widget, bubbles: true, cancelable: true, screenPoint: scrPt, mapPoint: mpPt });



_showRoadInfo: function (event) {

            var that = this._mapParams.infoWindow;


  , event.screenPoint);