Blog

How to set up sample geolocation data (geolocation introduction)

by on January 31, 2015

Geolocation is one of the most powerful features of Backendless. The geolocation service provides APIs for storing, searching and managing geolocation data. There are three main elements that the geolocation service operates on: geocategories, geopoints, and points metadata.

A geopoint contains a pair of coordinates: latitude and longitude. Additionally, a geopoint may contain metadata – an arbitrary collection of key/value properties. Finally, an application may group points in a category logically or otherwise. For example, the “Restaurants” category may contain geopoints representing various restaurants in a geographic area. Every geopoint could have the metadata properties such as “atmosphere” and “cuisine”, with the values describing the atmosphere at the restaurant and the type of food served.

The Geoservice includes a variety of APIs to add and update geopoints, run searches in a rectangular or circular area on a map, and many other functions.

The best way to start with the Geoservice is by setting up sample geodata, and Backendless Console makes it trivially easy. The sample data includes a geocategory with points identifying various cities around the globe. Each point includes metadata with the name of the city. To set up sample data:

  1. Login to Backendless Console, select an app and click the Geolocation icon.
  2. Click the Setup Sample Data button.
  3. The Console displays a popup confirming your choice. Click Yes to confirm.
  4. Once the sample data is added, you can immediately see it in the Console:

You can try changing the zoom of the map: click geopoints on the map or in the table. There are plenty of features and APIs to discover in this Feature-a-Day series.