Directions with custom address locator

2087
1
Jump to solution
07-22-2014 12:29 PM
williamcarr
Occasional Contributor II

I have created a address locator that works great in the geocoder, but I need to apply it to the directions widget as well. Tried for a few hours... and I am now stuck.

  var myGeocoders = [{

     // secure service 

  url: locatorUrl,

          singleLineFieldName: "SingleLine",

          name: "Enter Name"

        }];

        geocoder = new Geocoder({

          map: map,

          autoComplete: true,

          arcgisGeocoder: false,

          geocoders: myGeocoders,

          value: ""

        },"search1");

        geocoder.startup();

  var directions = new Directions({

          map: map

        },"dir");

        directions.startup();

I got a little hung up in the documentation and I'm not 100% where to go next.

Any help would be appreciated.

0 Kudos
1 Solution

Accepted Solutions
williamcarr
Occasional Contributor II

Boom goes the dynamite....

  var options = { 

          autoComplete:true, 

          arcgisGeocoder:{ 

            url: "Geocode service", 

     

 

          } 

        }; 

 

        var directions = new esri.dijit.Directions({ 

          map: map, 

          geocoderOptions: options 

 

 

        },"dir"); 

 

        directions.startup(); 

View solution in original post

0 Kudos
1 Reply
williamcarr
Occasional Contributor II

Boom goes the dynamite....

  var options = { 

          autoComplete:true, 

          arcgisGeocoder:{ 

            url: "Geocode service", 

     

 

          } 

        }; 

 

        var directions = new esri.dijit.Directions({ 

          map: map, 

          geocoderOptions: options 

 

 

        },"dir"); 

 

        directions.startup(); 

View solution in original post

0 Kudos