Shared Samples

WebGIS enables powerful geospatial web applications and services that securely share your organization’s rich geospatial data, and provides tools to deeply examine spatial data and create value added products, on demand. Please note a HGDN subscription is required to download code samples
Showing results for 
Search instead for 
Do you mean 

Example: Google Geocoding

by Technical Evangelist ‎09-09-2015 05:45 AM - edited ‎10-15-2015 07:22 AM (1,198 Views)

This example, utilizes the Google API to perform a reverse geocode. This is where the user will click on the map, the location clicked is sent to the Google GeoCoder for reverse processing and the address is sent back.

Start by adding the following Google script reference to the example.aspx page (or any other .aspx page which will be used). This allows us to access the Geocoding API.

<script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3.5&sensor=false"></script>

Next we create the function which will allow the user to click on the map and get the address information at that location. We will use the example code for getting the X,Y clicked.

Overview