still stuck on this because I only want to pass in county & state -
here's my code that pulls the data from the controls:
var address = {
county: "",
state: ""
};
dojo.forEach(this.locatorFields, dojo.hitch(this, function(name) {
address[name] = this.widgets[name].getValue();
}));
this.locator.addressToLocations(address);
no results are coming back even though I know ocean, nj exists - any ideas? do I need a list of predefined counties in each state?
var address ={}; Then specify any address fields that have value. for example, if address and state has value (ocear, nj), then your code should be: address.address ="ocean"; address.state ="nj";
I am not sure what I am doing wrong but when I only want to specify a county and state as the address locator - no results come back - can someone please provide me with some guidance on how to use this api correctly.
my javascript so far:
var address = {
county: "Ocean",
state: "NJ"
};
this.locator.addressToLocations(address);
It works fine when I use all the specific address variables like this:
var address = {
address : "",
city: "",
state: "",
zZip: ""
};
dojo.forEach(this.locatorFields, dojo.hitch(this, function(name) {
address[name] = this.widgets[name].getValue();
}));
Thanks for your continued help