Skip to content

Commit

Permalink
Fix issue with marker manager not updating correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjlandau committed Nov 24, 2010
1 parent f28abee commit ce3692d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions jquery.jmapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,20 @@
}
$(document).trigger('markerCreated.jMapping', [marker]);
});

google.maps.event.addListener(markerManager, 'loaded', function(){
if (doUpdate){
zoom_level = map.getZoom();
min_zoom = (zoom_level < 7) ? 0 : (zoom_level - 7);
markerManager.addMarkers(gmarkersArray(), min_zoom);
markerManager.refresh();
});
} else {
google.maps.event.addListener(markerManager, 'loaded', function(){
zoom_level = map.getZoom();
min_zoom = (zoom_level < 7) ? 0 : (zoom_level - 7);
markerManager.addMarkers(gmarkersArray(), min_zoom);
markerManager.refresh();
});
}

if (!(settings.link_selector === false) && !doUpdate){
attachMapsEventToLinks();
Expand All @@ -72,6 +79,7 @@
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL
},
mapTypeControl: false,
mapTypeId: google.maps.MapTypeId.ROADMAP,
zoom: settings.default_zoom_level
});
Expand Down

0 comments on commit ce3692d

Please sign in to comment.