How to use
Data has been provided for your use with this sample. It can be found at
<Your ArcGIS Developer Kit Install directory>/Samples/data/BloomfieldTownship/RoadCenterline_Locator.loc and <Your ArcGIS Developer Kit Install directory>/Samples/data/BloomfieldTownship/BloomfieldTownship.mxd.
If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders.
However, you will need to update the sample to point to the location of the data once you have extracted all the files.
Design time
- Verify that the Web ADF for the .NET framework is installed and functioning properly. For information on installing and configuring the Web ADF, consult the installation guide.
- Add the RoadCenterline_Locator.loc as a geocode server object named RoadCenterline_Locator to your GIS Server. Sample data is located in <ArcGIS Developer Kit install location>\Samples\data.
- In Windows Explorer, navigate to <ArcGIS Developer Kit install location>\Samples\ServerNET\ArcGIS_Geocode_Search, where there will be a CSharp and VBNet folder.
- In Windows Explorer, open the directory referencing the necessary language, that is, CSharp or VBNet. Open the solution file.
- Click the Debug menu, choose Start Debugging or press F5. If successful, ArcGIS_Geocode_Search_<language> application starts.
- Address any errors that occur in the debugging process.
Run time
- Open a Web browser and navigate to the Web application uniform resource locator (URL), for example, http://localhost/ArcGIS_Geocode_Search_CSharp/SchoolDistrictLocatorService.asmx, or start the Web application in Visual Studio.
- Click FindSchoolDistrictLocationsArcObjects (for Arcobjects) or FindSchoolDistrictLocationsSoap( for SOAP) public WebMethods exposed in the Web service.
- Specify the following parameters (1) FullAddress: 1575 Apple Ln, (2) Distance: 1000.
- The FullAddress parameters is used in the geocode process to determine a location (point). The geocoded point is buffered to select school districts in the SchooltaxDistricts feature class. The attributes of selected locations in feature class are returned in the Web service response. The page shows the results of the geocode and search in SOAP Extensible Markup Language (XML) format.
ArcGIS_Geocode_Search_CSharp\SchoolDistrictLocatorService.asmx | Web service endpoint. |
ArcGIS_Geocode_Search_CSharp\App_Code\SchoolDistrict.cs | Complex type composed of primitives data types. Used to package data in the Web service response. |
ArcGIS_Geocode_Search_CSharp\App_Code\SchoolDistrictLocatorService.cs | Contains the business logic to geocode, buffer, and search the SchoolDistrict feature class. |
ArcGIS_Geocode_Search_CSharp\App_Code\Utility.cs | Contains utility classes to assist service operations. |
ArcGIS_Geocode_Search_VBNet\SchoolDistrictLocatorService.asmx | Web service endpoint. |
ArcGIS_Geocode_Search_VBNet\App_Code\SchoolDistrict.vb | Complex type composed of primitives data types. Used to package data in the Web service response. |
ArcGIS_Geocode_Search_VBNet\App_Code\SchoolDistrictLocatorService.vb | Contains the business logic to geocode, buffer, and search the SchoolDistrict feature class. |
ArcGIS_Geocode_Search_VBNet\App_Code\Utility.vb | Contains utility classes to assist service operations. |
Download the files for all languages