aspose file tools*
The moose likes Java in General and the fly likes google maps application using java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "google maps application using java" Watch "google maps application using java" New topic
Author

google maps application using java

Ron Cam
Greenhorn

Joined: Oct 15, 2009
Posts: 4
Hi,

I need to build an application that contains a google map and the application will need to contain various buttons that perform certain actions on this google map. Like when pressing a button the maps shows a route on the map.

can you help me please ? I dont need coding I just need some help on how to get started !

thanks
ron
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

This should help: http://code.google.com/apis/maps/index.html


Steve
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

And welcome to the Ranch!
Ron Cam
Greenhorn

Joined: Oct 15, 2009
Posts: 4
hi,

thanks for the help. Im sure I will come back with more questions since these google api's are new to me.

Also I normally work with java netbeans. Fof me to make an app that has a map that works with goole maps API's I need to use the gwt4nb ? And the gwt4nb all it does is to convert the java code to javascript ? also even if I make a gui from the netbeans, this also will be converted into javascript by the gwt4nb ?

thanks
for you help again.
ron
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

I don't know what gwt4nb is, but anything which is IDE-specific is not something I would use. There are different options on the page I pointed you to, depending on the type of application. For example, if you are making a Web / Servlet / JSP application, then I would use the JavaScript API (as it would be running in a browser). If you are making a client-side application then I would probably use the Web Services, since I would be able to use JSON or the Java's URL utilities to communicate directly from the application.
Ron Cam
Greenhorn

Joined: Oct 15, 2009
Posts: 4
even if I know only to program with Java not with Javascript ? Is there any option for me ?

thanks
ron
Ron Cam
Greenhorn

Joined: Oct 15, 2009
Posts: 4
ah and gwt4nb is a Google Web Tool Kit plugin for netbeans
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

Ron Cam wrote:even if I know only to program with Java not with Javascript ? Is there any option for me ?

thanks
ron


Have you read the Web Service API? That allows you to send requests to Google Maps via URLs. The data is returned as either JSON or XML. You can use Java (or any other language) to send requests to those URLs and to interpret the JSON or XML. So yes, you can use their Web Service API with Java, and no need for Javascript.
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

What, exactly, do you mean by application? Most google maps applications are written as part of a web applicaiton, where the result of your Java code is an HTML page containing calls to the Google Maps API.

I've never heard of a standalone desktop application using Google Maps. It may exist, but that's not how I integrate Google Maps to my code.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14350
    
  22

Pat, such applications certainly exist. I have a GPS logging device - you take it with you while you go on a trip, for example, and it logs your GPS position a few times a minute. At home, you can read the log information from the device and with some software it shows on a map exactly what your route was. It's a desktop application that has Google Maps integrated into it to display the map.

But I don't know how exactly it does that (or even whether it's written in Java). Maybe it uses an embedded web browser widget that shows the map.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

Jesper de Jong wrote: I have a GPS logging device - you take it with you while you go on a trip, for example, and it logs your GPS position a few times a minute. At home, you can read the log information from the device and with some software it shows on a map exactly what your route was. It's a desktop application that has Google Maps integrated into it to display the map.

I have one of those too, and I've written some Java code (open source) Pat's Java library with GPS reading code.

I just use web-apps to do the integration with Google Maps. Perhaps they have a desktop integration, but Google wants you to use the web.

Which brings me back to my question for the OP, what exactly do you mean?

If I had an assignment to do this, I'd sure write some Java beans to work with JSPs talking to the Google Maps Javascript API
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42635
    
  65
Pat Farrell wrote:If I had an assignment to do this, I'd sure write some Java beans to work with JSPs talking to the Google Maps Javascript API

That's probably the issue - JSP implies a servlet engine, and JavaScript implies a browser - but neither may be in play here.


Ping & DNS - my free Android networking tools app
 
Don't get me started about those stupid light bulbs.
 
subject: google maps application using java