| Issue 4823: | Feature Request: "Sorry we have no imagery here" status | |
| 44 people starred this issue and may be notified of changes. | Back to list |
What would you like to see us add to this API? When street view receives a request for an image at a location where no image is available, it returns HTTP code 200, and a grey image of the requested size saying "Sorry we have no imagery here". It would be helpful to provide either: 1. An alternative API call to initially check if imagery exists at a location. Eg: http://maps.googleapis.com/maps/api/streetview_image_exists?location=56.960654,-2.201815 streetview_image_exists returning json with either YES or NO. 2. An HTTP status code other than 200 to indicate that imagery is not available at the given location. In some sense, this is really a 404 file not found case, but I can understand the value of returning some form of image to act as a placeholder on a web page. 3. An alternative API call to get the current "Sorry no imagery exists here" image at a specified image size. This would allow users to check the downloaded image against the standard error image (should it change in the future) to see if they had requested an image from a location without imagery. Eg: http://maps.googleapis.com/maps/api/streetview_no_imagery_image?size=640x200 streetview_no_imagery_image returning the "Sorry no imagery here image of the requested size. ********************************************************* For developers viewing this issue: please click the 'star' icon to be notified of future changes, and to let us know how many of you are interested in seeing it resolved. *********************************************************
Mar 19, 2015
(No comment was entered for this change.)
Status:
NeatIdea
Owner: ---
Aug 19, 2015
Issue 6739 has been merged into this issue.
Sep 22, 2015
Issue 8644 has been merged into this issue.
May 12, 2016
Issue 4154 has been merged into this issue.
May 13, 2016
I think a 404 makes perfect sense and there is no reason the response body cannot still contain the 'Sorry we have no imagery here' image. If anyone is interested, this is my workaround (your mileage may vary):
goog.labs.net.xhr.get(url).then(
function (response) {
//if google doesn't return 'image not found'
if (response.length > 6000) {
element.style.display = 'block';
element.style.backgroundImage = 'url(\'' + url + '\')';
} else {
//fall back to aerial view
showMap();
}
}
);
|
|
| ► Sign in to add a comment |
Labels: Internal-7347242