Skip to content

Instantly share code, notes, and snippets.

@scottbyrns
Created July 27, 2013 17:10
Show Gist options
  • Save scottbyrns/6095519 to your computer and use it in GitHub Desktop.
Save scottbyrns/6095519 to your computer and use it in GitHub Desktop.
@GET
@Path("/meter-distance-between-locations-with-ids:{origin}:{destination}")
@EndpointDescription(
name = "Get Distance Between Locations",
description = "Get the distance between two saved locations.",
signature = "/meter-distance-between-locations-with-ids:{origin}:{destination}",
availability = ResourceAvailability.BETA,
version = 1.0,
returnEntity = "Calculation")
public APIResponse meterDistanceBetweenToLocations(@PathParam("origin") Long originId, @PathParam("destination") Long destinationId);
@GET
@Path("/meter-distance-between:{originLatitude}:{originLongitude}-and:{destinationLatitude}:{destinationLongitude}")
@EndpointDescription(
name = "Get Distance Between Locations",
description = "Get the distance between two geo locations.",
signature = "/meter-distance-between:{originLatitude}:{originLongitude}-and:{destinationLatitude}:{destinationLongitude}",
availability = ResourceAvailability.BETA,
version = 1.0,
returnEntity = "Calculation")
public APIResponse meterDistanceBetweenToLocations(@PathParam("originLatitude") double originLatitude, @PathParam("originLongitude") double originLongitude, @PathParam("destinationLatitude") double destinationLatitude, @PathParam("destinationLongitude") double destinationLongitude);
@GET
@Path("/location-from-origin:{origin}-at-distance:{distance}-along-bearing:{bearing}")
@EndpointDescription(
name = "Get Location By Bearing and Distance",
description = "Get the location of an object by it's bearing and distance from a location of origin.",
signature = "/location-from-origin:{origin}-at-distance:{distance}-along-bearing:{bearing}",
availability = ResourceAvailability.BETA,
version = 1.0,
returnEntity = "Location")
public APIResponse locationByBearingAndDistanceFromLocation(@PathParam("origin") Long originId, @PathParam("bearing") double bearing, @PathParam("distance") double distance);
@GET
@Path("/location-from-origin:{originLatitude}:{originLongitude}-at-distance:{distance}-along-bearing:{bearing}")
@EndpointDescription(
name = "Get Location By Bearing and Distance",
description = "Get the location of an object by it's bearing and distance from a location of origin.",
signature = "/location-from-origin:{originLatitude}:{originLongitude}-at-distance:{distance}-along-bearing:{bearing}",
availability = ResourceAvailability.BETA,
version = 1.0,
returnEntity = "Location")
public APIResponse locationByBearingAndDistanceFromLocation(@PathParam("originLatitude") double originLatitude, @PathParam("originLongitude") double originLongitude, @PathParam("bearing") double bearing, @PathParam("distance") double distance);
@GET
@Path("/rhumb-line-bearing-between-locations:{origin}:{destination}")
@EndpointDescription(
name = "Get Rhumb Line Bearing Between Locations",
description = "Get the rhumb bearing between to saved locations by their unique identifiers.",
signature = "/rhumb-line-bearing-between-locations:{origin}:{destination}",
availability = ResourceAvailability.BETA,
version = 1.0,
returnEntity = "Calculation")
public APIResponse getRhumbLineBearing(@PathParam("origin") Long originId, @PathParam("destination") Long destinationId);
@GET
@Path("/rhumb-line-distance-between-locations:{origin}:{destination}")
@EndpointDescription(
name = "Get Rhumb Line Distance Between Locations",
description = "Get the rhumb distance between to saved locations by their unique identifiers.",
signature = "/rhumb-line-distance-between-locations:{origin}:{destination}",
availability = ResourceAvailability.OFFLINE,
version = 1.0,
returnEntity = "Calculation")
public APIResponse getRhumbLineDistance(@PathParam("origin") Long originId, @PathParam("destination") Long destinationId);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment