Commit 2defc1c8 authored by Elijah Byrd's avatar Elijah Byrd
Browse files

Added logic to detect if a marker is in map bounds before hiding it. Needs performance testing.

parent 21a20b73
Pipeline #17447 skipped
......@@ -342,9 +342,13 @@
*/
accessible_gmaps.resetAllMarkers = function(){
var mapData = accessible_gmaps.getMapData();
var bounds = accessible_gmaps.map.getBounds();
for(var i = 0; i < accessible_gmaps.markers.length; i++){
var markerID = "mkr-" + i;
jQuery('div#' + markerID).css('display', 'none');
var marker = accessible_gmaps.markers[i];
if(!bounds.contains(marker.getPosition())){
var markerID = "mkr-" + i;
jQuery('div#' + markerID).css('display', 'none');
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment