Sam
Sam

Reputation: 11

Draw route between two locations on map in HTML

I have insert static map (image of map) of United States. User will select source and destination by clicking on map and when it click show route button, route is being drawn on the map. How will I draw route between selected locations?

Upvotes: 1

Views: 2806

Answers (2)

marto
marto

Reputation: 4503

Seems to me that a sensible option would be to use the Google Maps API to get you actual "route" data (as in which roads to take, distances etc):

Google Maps JavaScript API - Routes and steps

Upvotes: 1

alex
alex

Reputation: 490433

Your best bet to draw upon the image is to use a canvas element.

Upvotes: 4

Related Questions