谷歌地图标记为纽带 [英] Google Maps Marker As a Link
本文介绍了谷歌地图标记为纽带的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直试图让这几个小时的工作: - (
I've been trying to get this to work for hours :-(
这实际上是一个解决方案张贴在这里一个老问题谷歌地图标记为纽带
It's actually a posted solution to an older question here Google Maps Marker as a link
这就是我放在一起,但它不会工作 http://jsfiddle.net/9GrcW/
This is what I've put together but it won't work http://jsfiddle.net/9GrcW/
推荐答案
看起来它,如果你改变这[一]的.url
到工作this.url
:
Looks like it works if you change this[i].url
to this.url
:
for ( i = 0; i < markers.length; i++ ) {
google.maps.event.addListener(markers[i], 'click', function() {
window.location.href = this.url;
});
}
这篇关于谷歌地图标记为纽带的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文