Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java API for Google Maps (or similar) [closed]

I was wondering if there is a Java library that acts as a wrapper for the Google Maps API. What I am interested in is displaying a satellite map of a specific region (lon, lat) on my desktop application. It doesn't have to be Google Maps specifically, any map service would do the trick.

What I need though is a library to work with a desktop client, no javascript, GWT etc.

Any ideas?

like image 449
Savvas Dalkitsis Avatar asked Jun 15 '09 16:06

Savvas Dalkitsis


People also ask

What is the best Google Maps API alternative?

Radar is the best alternative to the Google Maps API. Radar supports geocoding, search, and distance APIs with high-quality address and place data. Radar is more affordable than the Google Maps API, free up to 100,000 API requests per month and $0.50 per 1,000 requests thereafter.

Is Google Maps API open source?

Furthermore, Google Maps API isn't open-source and doesn't allow for many customization options. However, looking for an alternative to this API is an option that businesses should consider so they can still use store locators and other map services on their websites without breaking the bank.

What type of API is Google Maps API?

The Google Maps Geocoding API is the answer. This API can automatically determine an address based on a pin drop. The other way around, Geocoding can also convert addresses into geographic coordinates. With this API you can plot places on a map.

Is gmap API free?

You won't be charged until your usage exceeds $200 in a month. Note that the Maps Embed API, Maps SDK for Android, and Maps SDK for iOS currently have no usage limits and are at no charge (usage of the API or SDKs is not applied against your $200 monthly credit).


2 Answers

If you are just looking to display a satellite map image for a specific latitude longitude (without the google maps panning/zooming etc), then you should check out Google Static Maps.

You just need to build a URL string, then make an HTTP request (from your java implementation) for the image (in whatever format you like). You can specify a whole bunch of parameters in the URL to get the satellite image you are after:

From the URL:

http://maps.google.com/staticmap?center=40,26&zoom=1&size=150x112&maptype=satellite&key=ABQIAAAAgb5KEVTm54vkPcAkU9xOvBR30EG5jFWfUzfYJTWEkWk2p04CHxTGDNV791-cU95kOnweeZ0SsURYSA&format=jpg

EDIT: Ok, I actually deleted this answer because I discovered section 10.8 in the TOS explicitly forbids accessing static maps from outside a browser. But then I discovered this FAQ update which seems to allow it. I might ask a Google person and get the final word.

EDIT: Thanks Paracycle, not sure if that is a new addition to the FAQ, but in any case it is pretty explicit, you are not allowed to do this.

like image 65
RedBlueThing Avatar answered Oct 16 '22 14:10

RedBlueThing


Google maps does not allow for using it's images in desktop applications. Microsoft has a collaboration with USGS at http://terraserver-usa.com/. There is a freely available web service with a WSDL. You can use common Java WSDL binding libraries like Axis or CXF to create java object to access the service.

Also, NASA has the World Wind project which has a Java API. The images are not the Google images but much of the Google images are based off of these images.

like image 9
Clint Avatar answered Oct 16 '22 14:10

Clint