How can I tell if Google's Streetview Image API Returns “Sorry, we have no imagery here” (ie. NULL) Result?

后端 未结 8 628
清酒与你
清酒与你 2020-12-03 07:38

The Google Street View Image API lets you embed a static (non-interactive) Street View panorama or thumbnail into your web page, without the use of JavaScript.

Reque

8条回答
  •  伪装坚强ぢ
    2020-12-03 08:29

    It seems like google uses a json endpoint behind the scenes. I think this is what you are looking for http://andresmartinezsoto.wordpress.com/category/computing/google-maps-api/

    It returns empty object ({}) when there is no image available.

    Previously, I used a HEAD request to get the content-length and compared that to know if a image exists or not.

提交回复
热议问题