title: Next Panorama ID in street view
body: <p>I have a develop for to get a panoramic photo with a specif longitude-latitude in Street View. With GoogleMaps API, I can get the route (see image) from <strong><em>point A</em></strong> to <strong><em>point B</em></strong>. But I need the next pano_id in that route. How can I get that?</p>
  
  <p><a href="https://i.stack.imgur.com/mIXfP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mIXfP.png" alt="enter image description here"></a>
  I have this for now. Every black point is a step for the function <em>DirectionDisplay</em>, with the next code:</p>
  
  <pre><code>for (var i = 0; i &lt; myroute.legs.length; i++) {
                      for (var j = 0; j &lt; myroute.legs[i].steps.length; j++ ){
                        for (var k = 0; k &lt; myroute.legs[i].steps[j].lat_lngs.length; k++ ){
                          var start = myroute.legs[i].steps[j].lat_lngs[k];
                          var coords = start.lat() + '|' + start.lng() ;
                          console.info('cooords',coords);
                      }
                    }
  </code></pre>
  
  <p>I can get the longitude latitude of two points, but i need the longitude latitude of each 2 or 3 mts, (similar when you press the arrow in google street view). Like <a href="http://tripgeo.com/DirectionsMapExamples.aspx?id=2" rel="nofollow noreferrer">This Example</a></p>
  
  <p>[<img src="https://i.stack.imgur.com/qmJsc.png" alt="enter image description here"><a href="https://i.stack.imgur.com/qmJsc.png" rel="nofollow noreferrer">3</a></p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>I'm getting the Panorama ID with this code:</p>
  
  <pre><code>sv = new google.maps.StreetViewService();
  sv.getPanorama({location: myLatLng, radius: 50}, processSVData);
  
  function processSVData(info, status) {
  $.ajax({
                type: 'POST',
                contentType: "application/json; charset=utf-8",
                url: "{{ url_for('download_tiles') }}",
                async: false,
                data: JSON.stringify({pano_id: info.location.pano}),
                success: function(response){
                 }
  
     .... //get little images of panorama I later I build the panorama.
         //I get the panorama with the ID of the panorama.
  }
  </code></pre>
  
  <p>For now, I'm getting the Panorama photo in a specific longitude latitude. <code>mylatlng</code> is the variable with the longitude and latitude,
  <a href="https://i.stack.imgur.com/klC0q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/klC0q.png" alt="enter image description here"></a>
  (I'm drawing the red lines manually) </p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>For example: <a href="https://www.google.com.co/maps/dir/40.7284265,-73.9942564/40.7278422,-73.9947541/@40.7281321,-73.9950543,19z/data=!4m2!4m1!3e0?hl=es" rel="nofollow noreferrer">this</a> route in <em>GoogleMaps</em>. The variable <code>myroute.legs[i].steps[j].lat_lngs[k]</code> have 3 longitude - latitude. But in StreetView, I can do 6 clics, from (Brodway,E 4th St) to (Brodway,W 3rd st)</p>
  
  <p>thanks,</p>