开发者

Draw route between two locations on map in HTML

开发者 https://www.devze.com 2023-03-24 13:25 出处:网络
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.

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?


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消