|
POST
|
I am attempting to evaluate a field and get a list of scores from address candidates when I use my address locator service. I receive no errors but it does not work as my console.log displays nothing. Here is the code: require(["esri/tasks/AddressCandidate",
"dojo/_base/array",
"esri/dijit/Search",
"esri/tasks/locator",
"dojo/on",
"dojo/dom",
"dojo/domReady!"], function (AddressCandidate, array, Search, Locator, on, dom) {
var locator = new Locator("http://maps.decaturil.gov/arcgis/rest/services/Public/WebAddressLocator/GeocodeServer");
on(dom.byId("btnTest"), "click", function () {
array.forEach(addressCandidates, function (candidate) {
if (candidate.score > score && candidate.attributes.Loc_name === document.getElementById("ownerAddress").value) {
stop = candidate;
score = candidate.score;
// Display the score on the console.
console.log(score);
}
});
});
}); You can see that Find Address Candidates is part of the Geocode Service here: Find Address Candidates: (Public/WebAddressLocator) What do I need to change in my code to make it work? And I have my most recent version of my code here: csergent45/codeViolationNotice at dbfa38b4cc3c87f3153a6137aaa7529b9bceddeb · GitHub
... View more
07-17-2015
01:48 PM
|
0
|
3
|
3866
|
|
POST
|
I use Visual Studio and I had Lint on it once, but it found a lot of errors with the JavaScript API and/or jQuery. Is there a way to make it exclude files?
... View more
07-17-2015
11:55 AM
|
0
|
1
|
454
|
|
POST
|
Thanks. I bookmarked that. I still had a little bit of trouble following it, but at least it gives tips.
... View more
07-17-2015
11:47 AM
|
0
|
3
|
1716
|
|
POST
|
If I reference the Locator Task, will I be able to use find Address Candidates? Say you owned every house on your block and had to enter each address on each line on an online form. I have to verify that each one of those addresses is correct or close. That's why I am trying to use Address Candidates. But I am getting a syntax error from my code. Ignore the console.log line. I was in a rush, but there is a syntax error without that line. Any idea what it is? I want to figure that out before I add more code.
... View more
07-17-2015
09:24 AM
|
0
|
1
|
1716
|
|
POST
|
It's in my prans and curly braces. I don't have it set right.
... View more
07-17-2015
09:20 AM
|
0
|
0
|
1716
|
|
POST
|
That was a mistake. I know better than to write assignment statements.
... View more
07-17-2015
09:20 AM
|
0
|
0
|
1716
|
|
POST
|
I want to use the findAddress Candidates, but I am receiving a syntax error. What do I need to modify? <script>
require(["esri/tasks/AddressCandidate",
"dojo/_base/array"], function (AddressCandidate,array) {
on(dom.byId("btnTest"),"click",function() {
array.forEach(addressCandidates, function(candidate) {
if (candidate.score > score && candidate.attributes.Loc_name === document.getElementById("ownerAddress").value) {
stop = candidate;
score = candidate.score;
// Display the score on the console.
console.log = score;
}
})
});
</script> And the AddressCandidate code sample appear to be incomplete. What else do I need besides what they show. I figure my addressLocator; anything else? Here is my updated code: csergent45/codeViolationNotice at 3cd51e07008dfb3882231ba9f252d81dbef05bae · GitHub
... View more
07-17-2015
08:38 AM
|
0
|
12
|
4859
|
|
POST
|
I uploaded the project. There is a just an address field, but several. csergent45/codeViolationNotice · GitHub
... View more
07-17-2015
07:17 AM
|
1
|
1
|
1216
|
|
POST
|
I would like to check addresses that the user enters on a form against AddressCandidates using our WebAddressLocator: Public/WebAddressLocator (GeocodeServer) I want the Locator Service to run when the user exits the field. Once the Locator Service runs, I want to check if the address is found using the Locator Service. If it is not found, I want to display a pop-up with the addresses that are similar and allow the user to select from that list. How would I do that? I looked at the API Reference at: AddressCandidate | API Reference | ArcGIS API for JavaScript but there are no samples in the samples link for me look at. I uploaded my code for this project. It will not e-mail as the user name and password were removed from the web.config, but everything else is there. It's .NET, but that should not affect what I am trying to do. The page that I am trying to validate addresses in is registration.aspx and I will need to validate up to 31 addresses against our Web Locator Service. So, basically I need to continue to use this code for each address in each textbox entered. My code is here: csergent45/codeViolationNotice · GitHub I haven't written any code yet for the address candidates, as I really don't know where to start with this one. But I will have an update with the JS API references in my code as soon as possible. I have been asked to have this ready by the end of the day, so if you would embrace my crisis as your crisis I would greatly appreciate it.
... View more
07-17-2015
07:10 AM
|
0
|
0
|
2282
|
|
POST
|
I do plan on using a geocoder. It's so that we can verify addresses that users enter are valid to eliminate manual verification.
... View more
07-17-2015
06:43 AM
|
0
|
3
|
1216
|
|
POST
|
Thanks. Now they want me to try something else, but this will work if the other option I am tasked to do does not.
... View more
07-17-2015
06:40 AM
|
0
|
0
|
998
|
|
POST
|
I would like to do a search using an address locator and limit addresses to what is in the address locator. Is this possible? I need to create multiple searches on a form; is all of this possible. And if so, how?
... View more
07-16-2015
08:03 PM
|
0
|
4
|
3679
|
|
POST
|
I want to restrict what a user can enter into a form field. I could have over 80,000 values for street addresses, but I would like to query and use an autocomplete to make it easier on the user while restricting what they enter. Is a queryTask capable of this?
... View more
07-16-2015
07:59 PM
|
0
|
6
|
3937
|
|
POST
|
Kathleen, Check out my at at: csergent45/streetSigns · GitHub I dropdown list boxes in that application with domain values.
... View more
07-16-2015
07:54 PM
|
0
|
1
|
2122
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-26-2015 12:31 PM | |
| 1 | 06-24-2015 06:06 AM | |
| 1 | 07-15-2015 12:34 PM | |
| 1 | 05-21-2015 02:27 PM | |
| 1 | 05-19-2015 11:52 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|