有没有人知道为什么iPad缩放(你知道,你用两根手指放大文字/屏幕)在某些网站上不起作用?
例如:
谷歌搜索没有透露任何东西,这让我觉得这不是一个常见的问题.
预先感谢您的任何见解.
我正在实施Google Maps API,我希望第一个标记的InfoWindow在首次呈现模板时打开,但仅在某个条件为真时才打开.
我有这样的事情:
{% if project %}
//the following is automatically open the infowindow of the FIRST marker in the array when rendering the template
var infowindow = new google.maps.InfoWindow({
maxWidth:500
});
infowindow.setContent(markers[0].html);
infowindow.open(map, markers[0]);
{% endif %}
Run Code Online (Sandbox Code Playgroud)
这并不能扔在Firefox或Internet Explorer 7的错误; 它做我想要的 - 但它只是看错了.我的文本编辑器尖叫着警告/错误.
这是不好的编码练习吗?如果是这样,对替代方案的任何建议?
这是完整的代码,在脚本标记内,编辑出不相关的位:
function initialize() {
...
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
var markers = []
setMarkers(map, projects, locations, markers);
...
}
function setMarkers(map, projects, locations, markers) {
for …Run Code Online (Sandbox Code Playgroud)