Custom Geocoder Service Not Working with Geocoder Widget

494
4
Jump to solution
04-17-2014 08:48 AM
JasonLin
New Contributor
Hello,

I was trying out the Geocoder widget tutorial with our own custom geocoder service but didn't have any luck getting it to work. Not sure if that has something to do with the options within the Geocode object OR the geocoder service configuration needs some tweaking...can someone point me in the right direction for this?


        var geocoder = new Geocoder({           arcgisGeocoder: false,           geocoders: [ {             url: "http://maps.hrsa.gov/arcgis/rest/services/Locators/HDWSMPComposite/GeocodeServer",             name: "Custom",             placeholder: "Find a place",             outFields: "Xmin, Xmax, Ymin, Ymax",             singleLineFieldName: "SingleLine"           }],            map: map         }, dom.byId("search")); 


Here's the full jsfiddle

Thanks,
0 Kudos
1 Solution

Accepted Solutions
MarlaKostuk
New Contributor III
Hey Archenil,

Can you elaborate on what the issue is? I took a look at your code in jsfiddle and it seems like your custom geocoding widget is working like a champ.

-Marla

View solution in original post

0 Kudos
4 Replies
MarlaKostuk
New Contributor III
Hey Archenil,

Can you elaborate on what the issue is? I took a look at your code in jsfiddle and it seems like your custom geocoding widget is working like a champ.

-Marla
0 Kudos
JasonLin
New Contributor
Figured it out myself. I was missing a autocomplete flag. Silly mistake but it's all good now.

        var geocoder = new Geocoder({
          arcgisGeocoder: false,
          geocoders: [ {
            url: "http://maps.hrsa.gov/arcgis/rest/services/Locators/HDWSMPComposite/GeocodeServer",
            name: "HDW",
            placeholder: "Find a place",
            outFields: "Xmin, Xmax, Ymin, Ymax",
            singleLineFieldName: "SingleLine"
          }], 
          autoComplete: true,
          map: map
        }, dom.byId("search"));
0 Kudos
JasonLin
New Contributor
Hey Archenil,

Can you elaborate on what the issue is? I took a look at your code in jsfiddle and it seems like your custom geocoding widget is working like a champ.

-Marla


Thanks for check it out. It is working like a champ. Good widget, Esri.
0 Kudos
MarlaKostuk
New Contributor III
Awesome glad to see to see that you were able to fix the issue! Happy coding! :cool:
0 Kudos