Trying to use the Search widget for the first time and I'm getting an "Invalid URL" as I start to type in the widget. The service itself works since I can use it via the REST directory:
I'm modeling my code partly after what's in this thread (April 22nd by John Ritsko). Anyways here's my code:
var s = new Search({
map: app.map,
sources: [{
locator: new Locator(SERVERPATH + "/transportation/StreetsGeocder/GeocodeServer"),
singleLineFieldName: "Single Line Input",
name: "County Geocoding Service",
localSearchOptions: {
minScale: 300000,
distance: 50000},
placeholder: "Search for Street / Address",
maxResults: 3,
maxSuggestions: 6,
enableSuggestions: true,
minCharacters: 0
}]
},"search");
s.startup();
Here's the error in the console:
I've tried both an absolute URL to the Geocoder service as well as the relative pathing as shown above. So what gives?
Thanks!
Steve