开发者

Google Maps Street View Not Always Loading - How to Make it Fail Gracefully

I'm trying to use a Google Maps Street View as a background using a simple iframe embed that's set in CSS to 100% height and width.

Works fine... some of the time.

Sometimes though, the Google Map fails and I'm left with a gray background from the Google Street View iframe embed. It looks like Street View开发者_运维技巧 is Flash-based, while the regular map view is not. Not sure if that's part of the problem.

But basically, I was hoping that if the street view failed, I could instead have a static image fallback. But I'm not seeing a systematic way to determine whether it failed to load. Visually, it's obvious, but not seeing Flash or the JS throwing an error.

Any ideas?


you could always use a static gmap fallback: place the img in the same container your gmap is and just place it underneath. you get double bonus cause its good for SEO and Accessibility. http://code.google.com/apis/maps/documentation/staticmaps/ i blogged about this as well here: http://bowdenweb.com/wp/2011/05/optimize-google-maps.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜