Google Maps API 自定义街景质量问题 [英] Google Maps API custom Street View quality issue
本文介绍了Google Maps API 自定义街景质量问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个 Google Photo Sphere,我想将其嵌入到我的页面中:
使用 iframe,一切正常:
中找到)
I created a Google Photo Sphere and I want to embed this on my page:
Using iframe, everything works ok:
http://fotomilo.pl/test_iframe.aspx — quality is ok.
Using JavaScript API, there are problems:
http://fotomilo.pl/test_js.html — quality is poor.
Quality issue:
It look like tiles mismatch. Look at the image and panorama rendered with JavaScript.
解决方案I've been looking for solution quite long and I finally found..
...undocumented option of google.maps.StreetViewPanorama class named 'mode':
- 'html4': Street View tiles are rendered as HTML tags without warping.
- 'html5': Street View tiles are rendered using Canvas 2D.
- 'webgl': Street View tiles are rendered using WebGL (aka Canvas 3D).
For example:
... var map = new google.maps.Map( canvasElement, mapOptions ); var panorama = map.getStreetView(); var options = { mode : 'html4' }; panorama.setOptions( options ); ...
Try it.
(found at this tread)
这篇关于Google Maps API 自定义街景质量问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文