moshen / node-googlemaps

A simple way to query the Google Maps API from Node.js
MIT License
559 stars 148 forks source link

Check StreetView Existance #106

Open psuhas opened 8 years ago

psuhas commented 8 years ago

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
    }
});