Push Lat Lng from another function into Street View Image API
问题 I'm using the Google Maps JavaScript API and this solution for getting closest points on the map and displaying them. "pt" value example: 38.5803844,-121.50024189999999 Here is the code: function findClosestN(pt,numberOfResults) { var closest = []; for (var i=0; i<gmarkers.length;i++) { gmarkers[i].distance = google.maps.geometry.spherical.computeDistanceBetween(pt,gmarkers[i].getPosition()); gmarkers[i].setMap(null); closest.push(gmarkers[i]); } closest.sort(sortByDist); return closest; }