ynyz2003

geocoder problem

Discussion created by ynyz2003 on Mar 4, 2014
Latest reply on Mar 4, 2014 by timw1984dev
Hi friends,

I was learning geocoder widgets. When I downloaded the example and ran the .html page locally, the geocoding function didn't work. It works just fine with the live example on the Esri website. Can any one help me solve this problem?
Thank you all!

This is the code I am talking about:

require([
        "esri/map", "esri/dijit/Geocoder", "dojo/domReady!"
      ], function(Map, Geocoder) {
        map = new Map("map",{
          basemap: "gray",
          center: [-120.435, 46.159], // lon, lat
          zoom: 7
        });

        geocoder = new Geocoder({
          map: map
        }, "search");
        geocoder.startup();
      });

Nan

Outcomes