Created
          May 15, 2014 20:26 
        
      - 
      
- 
        Save salimkayabasi/220d0b0e99ce830f5de6 to your computer and use it in GitHub Desktop. 
    Draw route step by step on Google Maps
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | setTimeout(function () { | |
| Map.zoomOut(1) | |
| if (!canRate) { | |
| Map.travelRoute({ | |
| origin: origin, | |
| destination: destination, | |
| travelMode: 'walking', | |
| step: function (e) { | |
| setTimeout(function () { | |
| Map.drawPolyline({ | |
| path: e.path, | |
| strokeColor: '#ff2800', | |
| strokeOpacity: 0.4, | |
| strokeWeight: 10 | |
| }); | |
| }, 400 * e.step_number) | |
| } | |
| }); | |
| } | |
| }, 200) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment