Integration of Java Swing + Javascript + Google Maps.
Video: https://www.youtube.com/watch?v=hNrCp675A_I
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
What things you need to install the software and how to install them
Java 1.8 >
Google Maps Javascript API
You need a Google Maps Javascript API, to get one, visit the site: https://developers.google.com/maps/documentation/javascript/tutorial.
In the project there is a folder called: HTMLGMaps
, inside it there is a file called: simple_map.html
.
Open this file and change this: <YOUR_API_KEY>
, by your key you have created.
Move HTMLGMaps
to C:/
This is the secret for you to search on Google Maps using Java:
DOMDocument doc = browser.getDocument();
DOMElement address_element = doc.findElement(By.id("address"));
DOMElement search_element = doc.findElement(By.id("submit"));
DOMElement button = (DOMElement) search_element;
DOMInputElement address = (DOMInputElement) address_element;
address.setValue(jTextField1.getText());
button.click();
- Google Maps - API Javascript
- JXBrowser - JXBrowser V6.22
- Netbeans - Netbeans
- Abner Rodrigues - Initial work - kingaspx