Gets locations for an address.
CommandVerb¶
"locate"
Parameters
Name | Type | Description |
---|
StreetAddress | string | The street address being located |
City | string | The city for the address being located |
State | string | The state for the address being located |
ZipCode | string | The zipcode for the address being located |
HighlightHighestScore | bool | Highlight the highest score. |
Code Sample
FDOT.Map.executeCommand('locate', { StreetAddress: '605 Suwannee Street',
City: 'Tallahassee',
State: 'FL',
ZipCode: ''
},
onLocateCompleted);
Returns
AddressLocatorResult
|_Result
|_FeatureType
|_Id
|_Name
|_Description
|_GroupName
|_Attributes (AttributeDescription [])
|_
|_Name
|_Description
|_Type (.Net System.Type)
|_IsIdentifier
|_IsDisplayValue
|_Features (Feature[])
|_
|_HasDescription
|_Geometry
|_SpatialReference
|_X
|_Y
|_Points [][]
|_Paths [][][]
|_Rings [][][]
|_XMin
|_XMax
|_YMin
|_YMax
|_Radius
|_Attributes
|_
|_Key (AttributeDescription)
|_Name
|_Description
|_Type
|_IsIdentifier
|_IsDisplayValue
|_Value
|_DisplayValues
|_
|_Address
|_Score
|_Side
Usage
var addressLocatorResult = a.Result;
var features = addressLocatorResult.Features;
if (features.length > 0) {
var geometry = features[0].Geometry;
FDOT.Map.executeCommand('zoomToGeometry', { Geometry: geometry }, function () { });
}
See Also