node-googlemaps icon indicating copy to clipboard operation
node-googlemaps copied to clipboard

StreetView Nearby

Open stefanocudini opened this issue 11 years ago • 5 comments

In this package has been implemented the function getPanoramaByLocation with callback..???

I don't understand the parameters sequence :-(

I would like to get this, for search nearest streetview by location

var astorPlace = new google.maps.LatLng(40.729884, -73.990988);
var webService = new google.maps.StreetViewService();  
/**Check in a perimeter of 50 meters**/ 
var checkaround = 50;
/** checkNearestStreetView is a valid callback function **/

webService.getPanoramaByLocation(astorPlace,checkaround ,checkNearestStreetView);

function checkNearestStreetView(panoData){
    if(panoData){
        if(panoData.location){
            if(panoData.location.latLng){
                /**Well done you can use a nearest existing street view coordinates**/
            }
        }
    }
    /** Else do something... **/
}

stefanocudini avatar Apr 28 '14 02:04 stefanocudini

I think this is related to this API: https://developers.google.com/maps/documentation/javascript/streetview

As far as I can see this module do not provide it yet. But it would be a good addition in my opinion. At the moment I am heavily refactoring this library in order to overcome some issues other users already reported. Once that is done I think we can add it.

fabriziomoscon avatar Oct 11 '14 21:10 fabriziomoscon

I'm not sure it's exactly the same thing stefanocudini asked, but is there a way to "jump" or "move" to the closest streetview point from the one you're currently on, towards one of the two ways the road goes? wanted to know if I can automate via code the "arrow" clicking when you normally unse streetview on google and save a series of static images like a "walk sequence".

Thanks!

niguloto avatar Jul 02 '15 11:07 niguloto

yes @niguloto it's the same question!

stefanocudini avatar Jul 12 '15 11:07 stefanocudini

@fabriziomoscon now it's possible? :)

stefanocudini avatar Jul 12 '15 11:07 stefanocudini

There are differences between the server side node.js Google Maps library and the client JavaScript library.

The reference for server side street view is here: https://developers.google.com/maps/documentation/streetview/ and I don't see any implementation for getPanoramaByLocation()

This library strictly implements server side calls. Please refer to the first part of the readme to see the related documentations of what is currently possible.

fabriziomoscon avatar Jul 13 '15 09:07 fabriziomoscon