[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


How to combine java code and google maps

Posted on 2012-08-22
Medium Priority
Last Modified: 2012-09-19
Dear Experts
A couple of months ago I asked the following question:

"I have to develop a program that can display the sites on a map where certain plants have been found.  How do I start doing this in Java. It has to fit into a Java Swing application.
The data will come from a Access Database and I know how to make contact to Access.
Looking forward to your answer"

and I got the answer from Doug:

"I would suggest using Google maps to display the location of the plants (http://today.java.net/pub/a/today/2006/10/25/integrating-google-maps-into-web-application.html)
coupled with a component for showing HTML within the Swing app:

This answer looked promising, but I don't understand how to utilize the HTML/Java Script within the java code, for instance to open the Google Map in a JPanel and add some markers on the map. Can you give me a little more assistance on this, please
Question by:JorgenAx
1 Comment

Accepted Solution

JorgenAx earned 0 total points
ID: 38413671
The suggested solution was partly a good one, but I never managed to import XML code to the HTML file using AJAX. The connection was blocked becauses I  have both the homepage and the XML file on the same computer. This was blocked for security reasons

I have now solved the problem in another way. I have imported a java script file into another HTML-file.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Suggested Courses
Course of the Month18 days, 18 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question