geo:box Rectangle Filtering Function - AFS

AFS Integration Guide

Product
AFS
AFS_Version
7.9
Category
Reference Guide

Rectangle filtering function allows to display results located in a rectangle center around a point.

The aim of the function is to show on user's screen (generally rectangular) results around him.

To do so, it is possible to call geo:box function in an afs:filter. The following information are given: the center of the rectangle in decimal degrees (center), its height in meters (height) and its width in meters (width).

afs:filter=geo:box(center,height,width)

Example

A rectangle of 10 by 20 km around Lambesc:

afs:filter=geo:box(43.6547222222, 5.2625, 10000, 20000)

geo:box cannot be used to sort replies, but only to filter them.

If geolocation facets have not been configured using default names (geo:lat and geo:long), the following syntax must be used:

geo:box(center_latitude,center_longitude,height,width,latitude_facet_name,longitude_facet_name)