2

I am using the jframe in my application to show google maps.

When I want to show the route between the locations, I do like, I get the direction co-ordinates using the direction API URL like:

"https://maps.googleapis.com/maps/api/directions/json?origin=Kundalahalli,+Bengaluru,+Karnataka&destination=Marathahalli,+Bengaluru,+Karnataka&alternatives=true&key=[API_KEY]"

And I plot the JSON response on static map API like:

"https://maps.google.com/maps/api/staticmap?&size=640x640&path=geodesic:true|color:0x0000ff|weight:5|12.9709684,77.7142173|12.9709056,77.71226659999999|12.9558971,77.71483429999999|12.956154,77.6939043|12.9568557,77.6975092|12.9569979,77.69752029999999|12.9571073,77.6971808"

The image I am getting has straight lines and are inappropriate to my application. I want the output be like similar to the one we get in Google-maps. And the requirement is that this should be achieved in java.

help me in solving this, Thanks in advance.

PaDi
  • 255
  • 1
  • 5
  • 16

0 Answers0