0

I have a map with a heatmap utilizing the google visualization heatmap layer

jsfiddle here

If I try and add a normal map marker it fails with an uncaught type error somewhere in the google api.

The marker.setMap(map) line seems to happen, (inspecting the marker, it has a map property) but whatever this triggers on the map itself seems to fall over.

I've tried unsetting the heatmap layer before setting the marker, even tried not initialising the heatmap layer with the same results.

I'm beginning to think that by including the visualisation library I am losing the ability to add a map marker. If this is the case has anyone come across a workaround?

4

1 回答 1

2

您最初创建没有地图属性的标记,当前标记将在您单击某处(不仅在标记上)时出现,因为lnk-variable 将设置为document,而不是链接:

 var lnk = $(document, '.marker_toggle')

但它应该只是:

 var lnk = $('.marker_toggle')

演示:http: //jsfiddle.net/doktormolle/Avxap/

于 2013-06-17T07:33:40.657 回答