My Government Services 10.1 - Find Address

2834
7
06-18-2013 08:13 AM
Allison_Laforet__Charko
New Contributor III
We recently downloaded and published the My Government Services 10.1. We are in the process of replacing the Naperville data with our own.  When we try to find an address in our community, no results are returned. We can't seem to return any results outside of Naperville. How do you go about changing the address locator to something else? The config file says that the app is pointing to: http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer but it doesn't want to return any results. Does the sample app from Naperville have its own locator that uses that Geocoding service? How can it be opened up to accept any address in North America?
Thanks,
Allison
0 Kudos
7 Replies
BrianLord1
Occasional Contributor
Do you have the capabilities to create your own locators and publish them out as a geocode service?  If you do, that might be the best way to get accurate results (assuming your roads and address point layers are accurate).  I use created a composite locator (roads & address points) and published that out for use in all of our apps.

Otherwise, try swapping out the url you listed with the following ESRI one.
http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Address_NA_10/GeocodeServer

Good Luck,
Mark
0 Kudos
LindsayThomas
Occasional Contributor II
Allison,

What is your locale? (US, Canada? ) Is the Extent changed to your local area?

Cheers,
Lindsay
0 Kudos
Allison_Laforet__Charko
New Contributor III
Lindsay: We are in Canada. We changed the extent of the project to be our local area.

Mark: We tried replacing the URL with the TA_Address_NA_10 locator that you suggested and we still aren't getting results.
We looked at the field list at the URL (http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Address_NA_10/GeocodeServer) and made some changes to the config file but still no luck (we changed the LocatorFieldValues items below; in the original config file they were listed as "USA.StreetName", "USA.PointAddress", "USA.StreetAddress").

This is the locator section (currently) in our config file but it doesn't bring us back any results:

    // ------------------------------------------------------------------------------------------------------------------------
    // ADDRESS SEARCH SETTINGS
    // ------------------------------------------------------------------------------------------------------------------------
    // Set Locator service URL.

    LocatorSettings: {
        LocatorMarkupSymbolPath: "images/RedPushpin.png", // Set pushpin image path.
        MarkupSymbolSize: {
            width: 25,
            height: 25
        },
        Locators: [{
            DisplayText: "Search Address",
            DefaultValue: "1 Riverside Dr W, Windsor, ON", // Set default address to search.
            LocatorParamaters: ["SingleLine"], // Set Locator fields (fields to be used for searching).
            LocatorURL: "http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Address_NA_10/GeocodeServer",
            CandidateFields: "Loc_name, Score, Match_addr",
            DisplayField: "${Match_addr}",
            AddressMatchScore: 20,
            LocatorFieldName: 'Loc_name',
            LocatorFieldValues: ["House", "StreetName", "City", "Province"]
        }]
    },



Is there anywhere else that we need to make changes? Did we change the LocatorFieldValues incorrectly?
Any help woudl be greatly appreciated. We don't want to publish our own locators until we can get this to work so that we can test the app locally.
0 Kudos
MikeTschudi
Occasional Contributor
Hi Allison,

Using the 10.1.1 version of the app, I configured

    BaseMapLayers: [{
        Key: "topo",
        ThumbnailSource: "images/parcelMap.png",
        Name: "Topo",
        MapURL: "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"
    }],

    // Initial map extent. Use comma (,) to separate values and dont delete the last comma.
    DefaultExtent: "-8999921,5285755,-8686223,5560929",

(Changed the basemap, which controls the extents within which valid addresses must exist and changed the default extent to the Toronto area.)

and

// ------------------------------------------------------------------------------------------------------------------------
// ADDRESS SEARCH SETTINGS
// ------------------------------------------------------------------------------------------------------------------------
// Set Locator service URL.
LocatorURL: "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",

//Set locator name fields to search.
LocatorNameFields: [{
    FieldName: 'Loc_name',
    FieldValues: ["CAN.PointAddress", "CAN.StreetAddress"]
}],

// Set Locator fields (fields to be used for searching).
LocatorFields: "SingleLine",

// Set default address to search.
LocatorDefaultAddress: "12 Concorde Place Toronto ON M3C 3R8",

(Configured the World/GeocodeServer because it's in General Availability--NA_10 is being retired at the end of this year.)

and I can search for Toronto addresses.

From the config snippet, it looks like you may be using a pre-10.2 version. In that version, I made the same basemap and default extent changes as above and changed the locator config to
// ------------------------------------------------------------------------------------------------------------------------
// ADDRESS SEARCH SETTINGS
// ------------------------------------------------------------------------------------------------------------------------
// Set Locator service URL.
LocatorSettings: {
    LocatorMarkupSymbolPath: "images/RedPushpin.png", // Set pushpin image path.
    MarkupSymbolSize: {
        width: 25,
        height: 25
    },
    Locators: [{
        DisplayText: "Search Address",
        DefaultValue: "12 Concorde Place Toronto ON M3C 3R8", // Set default address to search.
        LocatorParamaters: ["SingleLine"], // Set Locator fields (fields to be used for searching).
        LocatorURL: "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",
        CandidateFields: "Loc_name, Score, Match_addr",
        DisplayField: "${Match_addr}",
        AddressMatchScore: 80,
        LocatorFieldName: 'Loc_name',
        LocatorFieldValues: ["CAN.StreetName", "CAN.PointAddress", "CAN.StreetAddress"]
    }]
},


Regards,
Mike
0 Kudos
KathrynClifton
New Contributor II
Is it possible to create a composite locator that uses my local address point layer geocode service, but otherwise uses the World geocoding service from ESRI?  This would be very nice.

Thank you for your assistance.
-Kat
0 Kudos
AllisonMuise
New Contributor III
Hi Kat,

If you have an ArcGIS Online organizational account you can add the World Geocode service to a composite locator. Using the Create Composite Address Locator tool this service can be found under Ready-To-Use-Services. If you have more questions specific to geolocation, you may find more help on the Geocoding forum.

Cheers,
Allison M
0 Kudos
StevenCuthbert
New Contributor III
Hi,

What locator fields would i use if i was in Australia?

The following doesn't work for me:
LocatorFieldValues: ["AUS.StreetName", "AUS.PointAddress", "AUS.StreetAddress"]

Thank you,
Steve
0 Kudos