This is my first post on geolocation – one of the most powerful features of Backendless. The geo location service provides APIs for storing, searching and managing geolocation data. There are three main elements which 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”, “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 areas on a map and many other functions.
The best way to start with the Geoservice is 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:
- Login to Backendless Console, select an app and click the Geolocation icon.
- Click the Setup Sample Data button.
- Console displays a popup confirming your choice. Click Yes to confirm.
- Once the sample data is added, you can immediately see it in 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 and I will be doing soon in future posts in this Feature-a-Day series.