Backendless Support
 

Creating relationships between data objects and geopoints

Mastering the Backendless GeoData Feature that empowers to declare a relationship in a data table schema with a geopoint a developer reasonably comes to the linked Backendless GeoData Feature which allows to populate the created column with one or more geopoints with necessary data.

After adding a table column table column of the GEOPOINT type (the process is described within the article dedicated to Declaring a relationship between a data table and geopoint(s)) the data objects in Backendless Console will appear as shown below (*notice the location column):

None of the objects in the table have any related geopoints - the cells in the location column are empty. However, there is a plus icon which allows you to create a relation between a data object and a geopoint.

Once clicking the plus icon, the following popup will appear (assuming there are geopoints in a developer's Backendless GeoLocation storage):

The popup window includes a list of geopoints for the selected geocategory. There is also a way to search for geopoints using SQL queries. Every geopoint in the list has a radio button which lets you select it. The radio buttons are shown for the one-to-one relations between a data object and a geopoint. If the relation is a one-to-many, every geo point has its own checkbox. To assign a geopoint to a data object, click the radio button for the geo point and click the Set Related GeoPoint button.

Once a relationship is established, the coordinates of the related geopoint are shown in the column:

After clicking the coordinates link, Console displays the geopoint in the Geolocation screen:

Review related topics:

Is article helpful?