In my previous posts I described how to set up a sample Geolocation data set and how to retrieve geopoints using the API. The geopoints in your application would not be the ones from the sample data set, we used it only to make it easier to get started with Backendless Geo location. Adding geopoints to your Backendless backend can be done either with the API or by using data import. In this post I will review the first approach – saving geopoints with API.

Optional metadata which is a collection of arbitrary name/value pairs.

The sample code below saves two geopoints in your Backendless backend. One point which represents Dallas, TX on the map, is added using the synchronous API. The other one represents Houston, TX and it is added with the asynchronous API call. Notice that both geopoints are added to the “cities” category, which will be created dynamically on the server if it does not exist. There are also some metadata such as the city name, population size and a URL of an image of the city skyline: