A basic routing google map clone application using JXMapViewer , JavaSwing and OSM data.
Prerequisites- Download JXmapviewer - https://jar-download.com/artifacts/org.jxmapviewer
- download osm file for whatever places you want. - https://download.geofabrik.de/
Follow the source code provided.
A Routing Map using JXMapViewer and Java Swing is a Java application that replicates some of the functionality and appearance of Google Maps. It utilizes the JXMapViewer library for displaying maps and Java Swing for the user interface. The project's objective is to provide users with a familiar map browsing experience within a Java desktop application.
Powered by JXMapViewer and Java Swing, reimagines the iconic map service in a desktop application. Offering map navigation, markers, and data overlays, it brings the basics of Google Maps to the Java environment. Explore locations and data effortlessly with this user-friendly, Java-powered map clone.
The jxmapviewer2-2.5 jar is used for accessing inbuilt features of the Java map. Map data is fetched from open sources like OpenStreetMap.
The project is structured into four essential packages, each playing a vital role in enabling its functionality. These packages are carefully designed to encapsulate specific features, streamline code organization, and promote modularity within the project.
The application opens upto the Map and the menu
The routes between two points can be found by rightclicking on the required waypoints anywhere on the map and selecting the start and end.
For example, the below image shows two waypoints selected in the country Cambodia. The displayed route can be seen as the blue line. The distance between the two points is given in the diatance label. The distance can be viewed in 3 units - miles, Kilometers and nautical miles through the menu list given.
The map has zoom and pan functions that can be utilized for details.
The clear points button can be used to clear the existing route.
The application can also be used to add permanant points for future references through the add point button. A point will be placed on the latitude and longitude entered. A description for the place can also be written. Here are the numbers for the city, Chennai, India.
Once mark point is clicked, the point will be marked on the map. If you click on the point, the description will show in a dialog box.
The map can be viewed in four different layouts. These layouts provide options for various preferences and use cases, enhancing user flexibility and usability.
1. Open street
2.Virtual
3.Hybrid
4.Sattelite
Submitted by Anuradha Krishnan (codebuilder3123)
Download packets of source code on Coders Packet
Comments