Global Search Geocoding
Is it possible to search for an address (use geocoding) from the global search bar?
eg: enter "10 Main St" in the global search bar and have it find the address on the map.
-
Hi Jason,
There are instructions on setting up a geocoding service to work with the global search box in the Viewer for Silverlight Administrator and Developer Guide. You'll want to look at section 8.8: Geocoding Module, and section 9.9: Include Geocoding Services in Global Search.
-Victoria
0 -
Thanks for the reply!
I *think* I've set it up right, but it still doesn't seem to work. I added this to the "geocoder" block from the site.xml...I currently have this:
<GeocodingEndpoint ConnectionString="url=http://blablabla" DisplayName="Address Search" ID="0" ServiceID="ArcGisGeocoder" >
<Properties>
<Property Name="globalSearchKey" DisplayName="" IsVisible="false" IsRequired="false" Value="Street" />
</Properties>
</GeocodingEndpoint>
If I put in "10 main st n" I get zero results, if i put this directly into the ArcGIS Geocoder Rest Query form, I get 2 results. Is there anything I'm forgetting, or some format I'm not using?0 -
oops, i didn't know it removed the IncludeInGlobalSearch property. I've added it in, but still no luck
<GeocodingEndpoint ConnectionString="url=http://blablabla" IncludeInGlobalSearch="true" DisplayName="Address Search" ID="0" ServiceID="ArcGisGeocoder" >
<Properties>
<Property Name="globalSearchKey" DisplayName="" IsVisible="false" IsRequired="false" Value="Street" />
</Properties>
</GeocodingEndpoint>
that's the current xml.0 -
Hi Jason,
This actually needs to be added to the geocoding module in the Viewer.xml for it to integrate properly with the global search. Your viewer.xml likely won't include this by default, so you'll have to add the entire block below to the <Modules> section:
<Geocoding> <Views> <View Region="DataRegion" Id="ForwardGeocodingView" Visible="false" /> </Views> <Configuration Title="Advanced Address Search (Geocoding)" TitleWithResult="Advanced Address Search - 1 Result" TitleWithResults="Advanced Address Search - {0} Results" GeometryServiceUri="{GeometryServiceUri}"> <GeocodingEndpoints> <GeocodingEndpoint ConnectionString="url=http://yourgeocodingservice" DisplayName="Address Search" ID="0" ServiceType="ArcGisGeocoder" IncludeInGlobalSearch="true"> <Parameters> <Parameter Name="globalSearchKey" DisplayName="" IsVisible="false" IsRequired="false" Value="Street" /> </Parameters> </GeocodingEndpoint> </GeocodingEndpoints> </Configuration> </Geocoding>0 -
Ah, now it makes sense why it's in the Silverlight viewer admin pdf.
It's working now, Thanks!0 -
I'm not having success with this one using the TA_Streets_US, mainly because I want to use it for address searches throughout a state.
I just upgraded to 3.11.1 and here's module configuration from the viewer.xml - which was also upgraded to Silverlight 1.7
<ExternalConfig Uri="../../../../../../Templates/SilverlightViewer_1_7/VirtualDirectory/Viewer.Defaults.xml" />
</ExternalConfigs>
<Modules>
<Geocoding>
<Views>
<View Region="DataRegion" Id="ForwardGeocodingView" Visible="false" />
</Views>
<Configuration Title="Advanced Address Search (Geocoding)" TitleWithResult="Advanced Address Search - 1 Result" TitleWithResults="Advanced Address Search - {0} Results" GeometryServiceUri="{GeometryServiceUri}">
<GeocodingEndpoints>
<GeocodingEndpoint ConnectionString="url=http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Streets_US/GeocodeServer" DisplayName="Address Search" ID="0" ServiceType="ArcGisGeocoder" IncludeInGlobalSearch="true">
<Parameters>
<Parameter Name="globalSearchKey" DisplayName="" IsVisible="false" IsRequired="false" Value="Street" />
<Parameter Name="State" DisplayName="State" IsVisible="false" IsRequired="false" Value="MN" />
</Parameters>
</GeocodingEndpoint>
</GeocodingEndpoints>
</Configuration>
</Geocoding>Is there a way to set the globalSearchKey Parameter value to 2 serviceparameters (Street and City).
this is what I get when I enter 100 Main St.
If I add a CITY parameter and set it to "Alberta" - not really what I want to do, but it works for this example. I get the following url and actually get results in the viewer:
Am I out of luck on this one?
Thanks for any help.
Sonia
0 -
Sonia,
You can create and publish your own geocoding service and then define it to have a single line entry, including all items. You are pointing at a pre-defined geocoding service, which unfortunately, you cannot modify. Of course this will require you have the data which the geocoder is published to. Refer to the ArcGIS Desktop documentation on creating a geocoding address locator, and ArcGIS Server for publishing it as a service.
0
Please sign in to leave a comment.
Comments
7 comments