AnsweredAssumed Answered

Why is locator being assigned to esri.Graphics class

Question asked by pladd on Sep 18, 2013
Latest reply on Sep 18, 2013 by pladd
Here's a noodle scratcher that no one seems to have addresses yet in the forum.  My code keeps tripping up when it gets to
locator.on("address-to-location-complete", showResults)


When I step into the code, it shows that locator is being assigned to the esri.Graphics class instead of esri.tasks.Locator class, which is where I would expect it to be assigned, much like it does on this page.

Here's some of the code:
<script src="http://js.arcgis.com/3.6/"></script>    <script> var dojoConfig = { parseOnLoad: true };</script>        <script type="text/javascript">           var map;           var locator;            require(["esri/map", "esri/tasks/locator", "esri/graphic", "esri/InfoTemplate", "esri/symbols/SimpleMarkerSymbol",             "esri/symbols/Font", "esri/symbols/TextSymbol", "dojo/_base/array", "dojo/_base/Color",             "dojo/number", "dojo/parser", "dojo/dom", "dijit/registry", "dijit/form/Button", "dijit/form/Textarea",             "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!"],        function (Map, ready, Locator, Graphic, InfoTemplate, SimpleMarkerSymbol, Font, TextSymbol, arrayUtils, Color, number, parser, dom, registry) {            ready(function () {               parser.parser();           });            map = new Map("map", {               basemap: "topo",               center: [-72.7975, 41.5360], // long, lat               zoom: 14,               slider: false           });             locator = new Locator("http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer");           locator.on("address-to-locations-complete", showResults);   //here declaredClass says esri.Graphics //not esri.tasks.Locator 


What am I missing?

Outcomes