Select to view content in your preferred language

Directions with custom address locator

2474
1
Jump to solution
07-22-2014 12:29 PM
williamcarr
Frequent Contributor

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
Frequent Contributor

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
Frequent Contributor

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(); 

0 Kudos