public class

LocatorSuggestionResult

extends Object
java.lang.Object
   ↳ com.esri.core.tasks.geocode.LocatorSuggestionResult

Class Overview

Class representing the result of a geocoding suggestion operation. See suggest(LocatorSuggestionParameters) for obtaining suggestion results.

Suggestion results are intended to be displayed as a user enters text into a search box. Each result has a text property which is suitable for displaying in a client application. The collection property returned by isCollection() flags whether or not the result represents a general search term for a POI ("Hotel", "Clothing Store") or a common place name with multiple locations ("McDonalds", "Starbucks"). When the collection property is false, the suggestion result represents a discrete address or place such as "380 New York St. Redlands, CA" or "Anaheim, California".

A suggestion result can be forwarded to geocoding find operations find(LocatorSuggestionResult, int, List, com.esri.core.geometry.SpatialReference) and find(LocatorSuggestionResult, int, List, com.esri.core.geometry.SpatialReference, com.esri.core.map.CallbackListener) to retrieve more information such as geometry and additional address component fields.

Summary

Public Methods
static List<LocatorSuggestionResult> fromJson(JsonParser parser)
Returns a list of suggestion results from the given Json.
String getText()
Returns the suggestion text.
boolean isCollection()
Returns if the suggestion is a collection of items.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static List<LocatorSuggestionResult> fromJson (JsonParser parser)

Returns a list of suggestion results from the given Json.

Parameters
parser JsonParser: The Json parser owning the suggestion result.
Returns
List<LocatorSuggestionResult> A list of suggestion results.

public String getText ()

Returns the suggestion text. This can be used to display suggestion results.

Returns
String The text associated with this suggestion.

public boolean isCollection ()

Returns if the suggestion is a collection of items. When true, the suggestion represents a general search term for a POI category or a general place such as "Hotel", "Clothing Store", or "Coffee Shop".

Returns
boolean true if the suggestion is a collection.

public String toString ()

Returns
String