Skip to content

Java library - Google Places and Google Street View Image APIs

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

autoscale/sprockets

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sprockets

Sprockets is a Java library that provides a Java interface for the Google Places and Google Street View Image APIs.

Google Places API

Full support for Place Search, Details, Photos, Autocomplete, and Query Autocomplete requests, including all parameters and returned fields. Getting a list of places can be as simple as:

Places.textSearch(new Params().query("pizza near willis tower")).getResult();

More detailed searches can include lat/long with radius, specific types of places, keywords, price range, places that are open now, etc. For each returned place, you can also retrieve its full details, reviews, photos, and events.

The Google Places API can return a lot of information about each place and most of the time you probably won't need every detail. For maximum performance and minimum memory usage, you can specify which fields you want and limit the number of results.

Places.nearbySearch(new Params().location(47.60567, -122.3315).radius(5000)
        .keyword("swimming").openNow().maxResults(5),
        NAME, VICINITY, RATING, PHOTOS).getResult();

Places Javadoc

Google Street View Image API

Download a Google Street View Image by supplying a lat/long or location name.

StreetView.image(new Params().location("18 Rue Cujas, Paris, France")).getResult();

For fine control of the camera, you can also specify the heading, pitch, and field of view.

StreetView.image(new Params().location(40.748769, -73.985332)
        .heading(210).pitch(33).fov(110)).getResult();

StreetView Javadoc

Download and Configure

Sprockets is available in Maven Central.

<dependency>
    <groupId>net.sf.sprockets</groupId>
    <artifactId>sprockets</artifactId>
    <version>1.1.0</version>
</dependency>

Before calling any of the Google Places API methods, you must first add your Google API key to the library configuration. See the Sprockets class description for instructions on configuring the library settings.

About

Java library - Google Places and Google Street View Image APIs

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks

Packages

No packages published