开发者

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?


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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜