Determine Asset Locations using Address Geocoding
Standard Esri Map Control
Determine Asset Locations using Address Geocoding
Technologies > User Interface Add-Ins> Geographic Information System (GIS) Views > Map with Address Geocoder
Geographic coordinates, or latitude and longitude, are needed to display asset locations on a map. If geographic coordinates are known, they may be entered directly into Web Central. If geographic coordinates are not known, they can be determined through geocoding using the asset’s street address.
This example uses geocoding to determine building location based on its address information.
Include the geocoder JavaScript class in the AXVW:
<js file="ab-arcgis-geocoder.js"/>
Create an instance of the Geocode Tool, passing the map control:
var geocodeTool = new Ab.arcgis.GeocodeTool(mapController.mapControl);
Call
geoCode()
, passing a restriction for the selected rows (see table of parameters below):
var restriction = this.getRestriction(rows);
geoCodeTool.geoCode(
'bl_ds',
restriction,
'bl',
'bl.bl_id',
['bl.lat', 'bl.lon'],
['bl.address1', 'bl.city_id', 'bl.state_id', 'bl.zip'],
true
);
geoCode()
Parameters
Parameter |
Description |
---|---|
dataSourceName |
The records data source |
restriction |
Records restriction |
tableName |
Table to which the record's geometry information will be added |
pkField |
The primary key field for the table |
geometryFields |
The geometry fields for the table |
addressFields |
The address fields for the table. The ESRI_Geocode_USA service requires: Street, City, State and Zone. |
replace |
Boolean. Whether to replace the existing geometry information |
Sample view: http://localhost:8080/archibus/ab-arcgis-bl-geocode.axvw