AnsweredAssumed Answered

Feature Layer Select query problem

Question asked by Nadir_Hussain on Apr 8, 2015
Latest reply on Apr 8, 2015 by rscheitlin

var myFeatureLayer = new FeatureLayer("http://dell-pc/ArcGIS/rest/services/SirenFeatureService/FeatureServer/1", {

          mode: FeatureLayer.MODE_SELECTION,

          outFields: ["SIREN_NO", "Reg_E", "Reg_A", "Featuer_Type", "Description", "Location", "POINT_X"]


map.on("click", function(evt) {



            selectQuery.geometry  =evt.mapPoint;

           myFeatureLayer.selectFeatures(selectQuery, FeatureLayer.SELECTION_NEW, function(features) {

               if (features.length > 0) {

                //store the current feature

                updateFeature = features[0];


      , map.getInfoWindowAnchor(evt.screenPoint));


              else {






            catch (err) {

                     txt = "There was an error on this page.\n\n";

                     txt += "Error description: " + err.message + "\n\n";

                     txt += "Click OK to continue.\n\n";






in above code featurelayer 1 is point layer and its symbols are picturemarker symbol in symbology.if i click on this symbol feature return 0.Even i check it returns the x and y point..if i change the feature layer number like 3,which is my polygon is simplefillsymbol in symbology.when i click on this it give me the feature.what can be the reason.might be the line is any  selectQuery.geometry  =evt.mapPoint is any problem.this works for polgon layer not work for point layer.

please help.