hchapa89

GEOCODER PROBLEM

Discussion created by hchapa89 on May 2, 2014
Latest reply on May 2, 2014 by hchapa89
What am I doing wrong in this geocoder?


Here is the  code.


[HTML]
var geocoder = new Geocoder({
   arcgisGeocoder: false,
   geocoders:[{
  url: "http://maps.lrgvdc911.org:6080/arcgis/rest/services/STEAR/Composite_STEAR/GeocodeServer",
            placeholder: "Search Address",
            outFields: "Xmin, Xmax, Ymin, Ymax",
            singleLineFieldName: "SingleLine"
   }],
   autoComplete: true,
   autoNavigate: true,
   zoomScale: 1000,
   map: map
   }, "search");
        geocoder.startup();
       
     geocoder.on('find-results', function (candidate) {
        var geom = candidate.results.results[0].feature.geometry;
        var symbol = new SimpleMarkerSymbol();
        symbol.setStyle(SimpleMarkerSymbol.STYLE_SQUARE);
        symbol.setColor(new Color([153, 0, 51, 0.75]));
        var graphic = new Graphic(geom, symbol);
        map.graphics.add(graphic);
    })[/HTML]

Outcomes