You can see the duplicated marker in the included image, the marker to the right is the correct marker, the on开发者_如何学Pythone to the left is a clone of the other one, it is not in the right place it can not be clicked, and stays in the same position relative to the "real" marker reqardless of zoom level.
Here is the code that generates the marker:
var map = new google.maps.Map($(this.jobDiv).find(".map_canvas")[0], { 'zoom': 10, 'center': this.latlng, 'mapTypeId': google.maps.MapTypeId.ROADMAP, 'mapTypeControl': false, 'navigationControl': true, 'streetViewControl': false });
var marker = new google.maps.Marker({
map: map,
position: this.latlng,
title: this.markerLabel
});
Turns out this was a CSS issue, I set {overflow:hidden!important;}, on the div containing the google map, turns out I needed {overflow:hidden;}, and now its fine. I'm not sure how that caused the problem but it is fixed now.
精彩评论