How to get status from Maps Embed API with streetview request when no image available

42 views Asked by At

Currently I use Google Maps Embed API with the streetview option as in:

https://www.google.com/maps/embed/v1/streetview/...(with key,location,heading,fov parms)

This works in most cases. But in the case where there is no imagery available for the requested location (presumably), the response (into iframe) shows a black image (with standard Google controls).

Is there any way in javascript or other solution which allows programmatically to discover when an image is not available and this black screen is displayed.

I currently I use the onload event of the iframe but the source (src) is simply the url requested which has no additional info.

Thanks for any suggestions.

0

There are 0 answers