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?
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.
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.
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.
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).
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With