I am using JXMapKit with openStreetMap as a provider and I am trying to find a way to display routes on the map. The routes are then used so that vehicles can follow them. Is there anyway to do so or are there any alternatives?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes you can. Taken from this link: http://www.naxos-software.com/blog/index.php?/archives/92-TracknMash-Openstreetmap-Karten-in-JavaSwing-mit-JXMapViewer.html
You write your own Painter class and override the paint method to draw lines:
Where points is your list of GeoPosition objects, which form your route.
Then you add this Painter to your MapKit as an OverlayPainter: