moshen / node-googlemaps

A simple way to query the Google Maps API from Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check StreetView Existance

psuhas opened this issue · 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
    }
});