如何:点击标记时 - 使地图变暗并在信息图上显示一个大的div而不是信息框 [英] how to: when marker is clicked - dim the map and show a big div instead of an infobox on top of the map with information
问题描述
我有一个带有可过滤标记的 Google地图,并且包含每个标记的简单信息(当您点击它们时 / em>),但想知道这是否可能:
当您在>标记上单击
时 - 请改为默认的信息框
大的 div
出现在地图顶部,标签显示所有可能的数据I将通过 JSON (图片,链接,图片)提供一个标记。
在您的循环添加标记时,添加如下内容:
google.maps.event.addListener(marker,'click',(function(marker,i){
return function(){
... your code ...
}
})
)
在您的代码中,您需要确定地图大小,并在顶部放置一个半透明的DIV,然后在地图的脱机区域中显示自己的绝对定位的DIV元素。
I have a Google Map with filterable markers and info-boxes
containing simple information about each marker( when you click them ), but was wondering if this is possible:
When you would click
on a marker - instead of a default info-box
a big div
appears on top of the map with tabs which shows all the possible data I will provide about a marker via JSON ( images, links, pictures ).
How would you approach about implementing this functionality?
In your loop to add markers, add something like this:
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
... your code ...
}
})
)
In your code you need to determine the map size and put a translucent DIV over top, then show your own HTML absolutely-positioned DIV inside the map's weapping element.
这篇关于如何:点击标记时 - 使地图变暗并在信息图上显示一个大的div而不是信息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!