autocomplete working with geocoder

2969
2
Jump to solution
06-20-2013 06:26 AM
Asta_KristinOladottir
New Contributor III
I am not able to get autocomplete to work, It works fine when I build an application with ArcGIS viewer for flex but when I build an application with the same geocode service with arcgis api for javascript (https://gis.lmi.is/ako_os/) it doesn't work.
Here is my code:
var myGeocoders = [{
             url: locatorUrl,
             name: "geocode_thjonusta_single",
      singleLineFieldName: "SingleLineCityName"
        }];


        var geocoder = new esri.dijit.Geocoder({
          map: map,
          autocomplete: true,
          arcgisGeocoder: false,
          geocoders: myGeocoders

        },"search");

        geocoder.startup();

[ATTACH=CONFIG]25383[/ATTACH]
0 Kudos
1 Solution

Accepted Solutions
KellyHutchins
Esri Frequent Contributor
I ran a quick test using your geocoder and autocomplete worked for me. Here's a fiddle showing the working code:

http://jsfiddle.net/uTW6e/

View solution in original post

0 Kudos
2 Replies
KellyHutchins
Esri Frequent Contributor
I ran a quick test using your geocoder and autocomplete worked for me. Here's a fiddle showing the working code:

http://jsfiddle.net/uTW6e/
0 Kudos
Asta_KristinOladottir
New Contributor III
Thank you very much Kelly 🙂
0 Kudos