Java Virtal Machine.net

[ News ] rss

February 01, 2011

Mark Wielaard: New GPG key. Finally created a new GPG key using gnupg. The old one was a DSA/1024 bits one and 8 years old. The new one is a RSA/2048 bits one. I will use the new one in the future to sign any release tarballs I might create. pub 2048R/57816A6A 2011-01-29 Key f...

More »

February 01, 2011

Andrew Hughes: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released!. We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: The IcedTea project provides a harness to build the source code from OpenJDK6 u...

More »

December/2024
SunMonTueWedThuFriSat
1234567
891011121314
15161718192021
22 232425262728
293031    

[ Archives News
for 'Java Technology' ]

home > news > java technology > adding google maps to your java application

Adding Google Maps to your Java Application

Google maps was a useful hit from the moment it went on line. Since then thousands of web pages have added map capability to their sites, courtesy of Google. Let me illustrate how you can add Google maps to your Java application. Background Google furnishes its maps via a simple REST request. Does this mean you need to add some fancy REST framework to your application? Not at all! Java provides all you need right in the standard libraries, and it is very easy to do. (that's part of the real elegance of REST) Getting It To request a map, you start with the following URL: http://maps.google.com/maps/api/staticmap? After the question mark, append all of the details you wish to be included in the map, separated by ampersand (&) symbols. For example: http://maps.google.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY& zoom=14&size=512x512&maptype=roadmap This requests a road map centering on the Brooklyn Bridge, in New York City, at zoom level 14, 512x512 pixels in size. There's a very rich collection of options for specifying and decorating maps, Google has very helpfully made a highly detailed page explaining them all. As I hope you've reasonably guessed; the http request dutifully returns an image of the map requested. That's all there is to it! Using It Happily, Java provides all the resources you need to use this great Google feature right in the Standard Edition. Simply create a java.net.URLCon...


Date: October, 16 2010
Url: http://www.java.net/blog/cajo/archive/2010/10/16/adding-google-maps-your-java-application


Others News

©2002-2019Java-Virtual-Machine.net it | free web design software | website designer | mobiriseextensions.com | formoid.com