Skip to content

Deleting a GeoPoint

There are two ways to delete a geopoint from the Geolocation storage:

Deleting a GeoPoint using the Backendless Console

To delete a geo point using the Backendless Console:

  1. Log in to the Backendless Console, select your app and click the Geolocation icon.
  2. Select a geo category containing the geopoint to be deleted.
  3. Click the checkboxes next to the geopoint(s) which should be deleted.
  4. Click Delete Selected from the button bar as shown below:
    geo-delete-geopoints.zoom50
  5. Click Delete in the confirmation popup to confirm the deletion.
  6. A confirmation notification will appear in the top right corner.

Deleting a GeoPoint with the API


- (void)removeGeoPointWithGeoPoint:(GeoPoint * _Nonnull)geoPoint responseHandler:^(void)responseHandler errorHandler:^(Fault * _Nonnull)errorHandler;
func removeGeoPoint(geoPoint: GeoPoint, responseHandler: (() -> Void)!, errorHandler: ((Fault) -> Void)!)

where:

Argument                Description
geoPoint an instance of GeoPoint to delete from the geolocation storage.

Example

The example below demonstrates how to delete a geopoint. A geopoint is added first, then subsequently deleted.

GeoPoint *geoPoint = // the existing GeoPoint
[Backendless.shared.geo removeGeoPointWithGeoPoint:geoPoint responseHandler:^{
    NSLog(@"GeoPoint has been removed");
} errorHandler:^(Fault *fault) {
    NSLog(@"Error: %@", fault.message);
}];
let geoPoint = // the existing GeoPoint
Backendless.shared.geo.removeGeoPoint(geoPoint: geoPoint, responseHandler: {
    print("GeoPoint has been removed")
}, errorHandler: { fault in
    print("Error: \(fault.message ?? "")")
})