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

Check StreetView Existance

Open psuhas opened this issue 10 years ago • 0 comments

Hello,

Is there any way we can get Maps Object so we can run some more functions like shown in following URL

Specifically: We would like to check if the street view exists? If so then make the download call.

any suggestions? Thanks,

http://stackoverflow.com/questions/2675032/how-to-check-if-google-street-view-available-and-display-message

var streetViewService = new google.maps.StreetViewService();
var STREETVIEW_MAX_DISTANCE = 100;
var latLng = new google.maps.LatLng(40.7140, -74.0062);
streetViewService.getPanoramaByLocation(latLng, STREETVIEW_MAX_DISTANCE, function (streetViewPanoramaData, status) {
    if (status === google.maps.StreetViewStatus.OK) {
        // ok
    } else {
        // no street view available in this range, or some error occurred
    }
});

psuhas avatar Feb 25 '16 15:02 psuhas