Using Geolocations

You can store and manage geolocations represented with latitude and longitude coordinates in a JSON document in each KiiObject.

A geolocation can be stored as a JSON object for a key as shown in the figure below. You can store multiple geolocations according to the specification of your service.

By having geolocations in KiiObjects, you can query KiiObjects in a rectangular area specified by two points (GeoBox query) and in a circular area specified by the center and radius of the circle (GeoDistance query). You can get a list of KiiObjects that are within an area specified by a query condition using the location key.

A query condition using geolocations can be combined by logical operators such as AND and OR with other query conditions, for example, that returns KiiObjects such that the score key of each KiiObject has a value greater than 70.

You can handle a geolocation similarly to other custom fields. This is because a geolocation is not a special attribute value for KiiObjects but a value in one of the data types in the JSON format. Make use of geolocation data with the flexibility of the JSON format when designing data according to the specification of your service.

Learn more...

  • For more information about the geolocation feature, see "Managing Geolocations" (Android, iOS, JavaScript, REST) in the programming guide.