The GeoLocatorFormHandler features two handle method:

Commerce also includes a geo-location droplet. Refer to the ATG Commerce Guide to Setting Up a Store for information on this droplet. Use the form handler when user input is required, for example a customer providing a postal code. Use the droplet when user input can be inferred, such as when location information is available in the browser.

The GeoLocatorFormHandler includes the following input properties. For additional information, refer to the ATG Platform API Reference.

Location Properties

Location properties provide a centralized location from which to search. Note that address, postalCode, city and state require a GeoLocatorProvider that supports these methods:

Property Name

Type

Description

address

String

Free-form address used to find a location.

city

String

When provided with state, both are used to find a location.

state

String

When provided with city, both are used to find a location.

postalCode

String

Postal code used to find a location.

latitude

double

If another input method, such as postalCode, is used, the value returned by the GeoLocatorService is used for latitude.

longitude

double

If another input method, such as postalCode, is used, the value returned by the GeoLocatorService is used for longitude.

countryCode

String

If provided along with language, is used to create a Locale for the geo-location query. If not provided, the request’s locale is used.

language

String

If provided along with countryCode, is used to create a Locale for the geo-location query. If not provided, the request’s locale is used.

Site Filtering Properties

Site filtering properties are used when the items being located have a site membership property. By default, filtering occurs on the current site, but the search can be filtered to include specific sites.

Property Name

Type

Description

siteIds

Collection

IDs by which to constrain the results.

siteScope

String

Site scope by which to constrain the results. A site scope can be:

current – Results are restricted to current sites
any – Results are filtered to items that have at least one site
all – Results are not filtered by site
none – Results include items that have no site memberships

isIncludeInactiveSites

Runs the filter on all sites, including inactive sites.

isIncludeDisabledSites

Runs the filter on all sites, including disabled sites.

Distance Properties

Distance properties indicate the range of the returned results. Only items within the provided distance will be in the result set. Note that by default, distance is measured in meters.

Property Name

Type

Description

distance

double

Items within this distance in meters are returned.

unitOfMeasureKey

String

The unit of measure of the distance.

maximumDistance

double

The maximum allowed search distance, measured in meters. A value of -1 searches all items.

Redirection Properties

Redirection properties are available to set URLs for conditional redirection. If a URL parameter is not available, redirection will not occur:

Property Name

Type

Description

successURL

String

The URL that is used if no errors are encountered.

errorURL

String

The URL that is used if errors occur.

clearQueryURL

String

The URL used when the clearQuery action occurs.

Results Properties

Results properties are available once the search has been run:

Property Name

Type

Description

locationResults

Collection

A collection of repository items returned by the locateItem handle method.

searchResultsByItemType

String

Returns the results sorted by item type.

Page Navigation Properties

Page navigation properties allow you to create controls that navigate between pages of results. The following properties can be used to create navigation buttons on the results page:

Property Name

Type

Description

enableCountQuery

Boolean

If true, locationResults returns a maximum of maxResultsPerPage based on the requested currentResultPageNum.

maxResultsPerPage

int

Maximum number of results to display for a page of results.

resultSetSize

int

The number of results returned by the query.

endIndex

int

The ending index to display based on the current page.

startIndex

int

The starting index to display based on the current page.

currentResultPageNum

int

The current page of results being displayed (1-based).

resultPageCount

int

The number of pages of results.

startCount

int

The index of the first record of the result set that is displayed within the current page.

endCount

int

The index of the last record of the results set that is displayed on the current page.

The following properties determine the managers, services and types of items to use:

Property Name

Type

Description

coordinateManager

CoordinateManager

The CoordinateManager used to find items based on their location.

siteGroupManager

SiteGroupManager

The SiteGroupManager used to interpret the site scope.

siteManager

SiteManager

Identifies the SiteManager to set.

geoLocatorService

GeoLocatorService

The GeoLocatorService used to identify latitude and longitude based on an address.

itemType

String

The item type to search for. Must be a valid item-descriptor for the repository used by the coordinateManager.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices