Skip to content

Commit

Permalink
Merge pull request #96 from SemanticMediaWiki/ajax-leaflet-cluster
Browse files Browse the repository at this point in the history
Make leaflet cluster work with ajax
  • Loading branch information
JeroenDeDauw authored Aug 8, 2016
2 parents 87cbbf3 + f816159 commit f6bc5c3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/services/GoogleMaps3/ext.sm.googlemaps3ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
if ( ajaxRequest !== null ) {
ajaxRequest.abort();
}
ajaxRequest = sm.ajaxUpdateMarker( map, query).done( function () {
ajaxRequest = sm.ajaxUpdateMarker( map, query ).done( function () {
map.createMarkerCluster();
ajaxRequest = null;
} );
Expand Down
5 changes: 3 additions & 2 deletions src/services/Leaflet/ext.sm.leafletajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
if ( ajaxRequest !== null ) {
ajaxRequest.abort();
}
ajaxRequest = sm.ajaxUpdateMarker( map, query).done( function () {
ajaxRequest = sm.ajaxUpdateMarker( map, query ).done( function () {
map.createMarkerCluster();
ajaxRequest = null;
} );
} );
} );
}, 500 );
}, 1000 );
} );
})( window.jQuery, window.sm );
2 changes: 1 addition & 1 deletion src/services/OpenLayers/ext.sm.openlayersajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
if ( ajaxRequest !== null ) {
ajaxRequest.abort();
}
ajaxRequest = sm.ajaxUpdateMarker( map, query).done( function () {
ajaxRequest = sm.ajaxUpdateMarker( map, query ).done( function () {
ajaxRequest = null;
} );
} );
Expand Down

0 comments on commit f6bc5c3

Please sign in to comment.