Given the geocode values for two locations, the Endeca MDEX can calculate the distance between those locations. The format of a geocode value consists of a latitude value and a longitude value separated by a comma. For example:

34.1548005,-118.4765695

The location repository stores latitude and longitude values in separate latitude and longitude properties. To supply locations to the MDEX in geocode format, the repository defines a geocode derived property that is computed from the latitude and longitude values:

<property expert="false" readable="true" category-resource="categoryDetails"
    display-name-resource="geocode" data-type="string" hidden="false"
    writable="false" name="geocode" required="false" cache-mode="inherit"
    queryable="false">
  <derivation user-method="atg.repository.dp.Geocode">
            <expression>latitude</expression>
            <expression>longitude</expression>
  </derivation>

The geocode property is specified for indexing in the XML definition file of the StoreLocationOutputConfig component:

<property name="geocode" type="geocode" output-name="store.geocode"/>

When a customer uses the Search Near Me feature of the store locator, the MDEX computes the distance to each store by using the geocode value for the customer’s location (supplied by the browser) and the geocode values for the stores. This feature is discussed in more detail in the Selecting Stores by Distance section.


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