How to combine java code and google maps

Posted on 2012-08-22
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 (
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

    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 Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
    By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
    Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
    Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

    755 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

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now