get route from google maps and points on the map each 2 km

前端 未结 1 818
旧时难觅i
旧时难觅i 2021-01-16 19:03

I know GPS coordinates my start and end point. Now I would like to get driving route for this journey. And then get GPS coordinates of every 2nd km on this route. How can I

1条回答
  •  孤街浪徒
    2021-01-16 19:49

    My answer for other people: Use code in comments and console.log(markers) - there are GPS coordinates - see in code + see interval for milestones in meters. I did not use php but javascript.

    working fiddle with code below

    
    
    
      
      creation of markers along a route - jsFiddle demo by doktormolle
      
    
    
    
    
    
    
    
    
      
    

      0 讨论(0)
    提交回复
    热议问题