AnsweredAssumed Answered

Add SimpleMarkerSymbol to Geocoder

Question asked by DCSD_gmarrero on Jun 16, 2015
Latest reply on Jun 22, 2015 by DCSD_gmarrero

I'm currently updating the Geocoder in WAB to work like the link below but I can't figure out how to add a marker when an address is found. Can someone tell me why this code is not adding a graphic after inputting an address in the geocoder?


Trigger Layer(s) Popup with Feature.Geometry



      onFindResults: function(results) {

        //Check to see if the user typed an MGRS or USNG string

        this.lastMgrsResult = this.lookupMgrs(results.results.value);

        if (null !== this.lastMgrsResult) {

          // Get reference ellipsoid coordinates of the current coordinate system

          // var mapWkid =;

          // var srWkid = csUtils.isProjectedCS(mapWkid) ?

          //csUtils.getGeoCSByProj(mapWkid) : mapWkid;

          //Make a new object just like the objects in results.results.results

          var point = new Point(



            new SpatialReference({

              wkid: 4326 //srWkid   should use the ellipsoid SR of the current coordinate system


          var extent =;

   var symbol = new SimpleMarkerSymbol();


  symbol.setColor(new Color([153,0,51,0.75]));

          var graphic = new esri.Graphic(point, symbol);;

          var resultObject = {

            extent: extent,

            feature: feature,

            name: this.lastMgrsResult.text


          //Insert at start of results list