Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 2.42 KB

Readme.md

File metadata and controls

45 lines (35 loc) · 2.42 KB

#Google Maps WebServices for JAVA

Allow you to consume Google Maps WebServices in your JAVA project. This library is compatible with Google Appengine (no use of HTTPOK or async libs).

Master Build Status Coverage Status
Develop Build Status Coverage Status

Supported Services

Currently only 2 services are supported

Using Direction Service

DirectionResponse dr = DirectionService.gen()
	.origin("19 rue de la viabert, lyon, France")
	.destination("102 avenue saxe, lyon, France")
	.call();

Generate a DirectionService, add the originaddress, the destination address, then use the method call() to get a DirectionResponse object.

The DirectionResponse object has the same definition of the one defined by GoogleMaps. See the GoogleMaps definition

Using Distance Matrix

DistanceMatrixResponse response = DistanceMatrixService.gen()
	.addOrigin("19 rue de la viabert, 69006 Lyon")
	.addOrigin("102 avenue maréchal de saxe 69003 Lyon")
	.addDestination("102 avenue maréchal de saxe 69003 Lyon")
 	.addDestination("19 rue de la viabert, 69006 Lyon")
	.call();

Generate a DistanceMatrixService, add your origin addresses and your destination addresses. Using call()return your a DistanceMatrixResponse object that match the Google Maps definition

Google Maps Premier

You can set up the lib with your Google Maps Premier credentials.

AbstractRequest.setApiClientId("my-client-id");
AbstractRequest.setApiCryptoKey("my-api-key");

This will sign all of your requests and let you access special features like traffic estimation.