Fix some bugs regarding OMS by introducing a new helper function
This commit is contained in:
@ -373,7 +373,7 @@ window.plugin.playerTracker.drawData = function() {
|
||||
}
|
||||
|
||||
m.addTo(playerData.team === 'RESISTANCE' ? plugin.playerTracker.drawnTracesRes : plugin.playerTracker.drawnTracesEnl);
|
||||
window.oms.addMarker(m);
|
||||
window.registerMarkerForOMS(m);
|
||||
|
||||
// jQueryUI doesn’t automatically notice the new markers
|
||||
if (!isTouchDev) {
|
||||
@ -421,15 +421,6 @@ window.plugin.playerTracker.handleData = function(data) {
|
||||
plugin.playerTracker.processNewData(data);
|
||||
if (!window.isTouchDevice()) plugin.playerTracker.closeIconTooltips();
|
||||
|
||||
plugin.playerTracker.drawnTracesEnl.eachLayer(function(feature) {
|
||||
if(feature instanceof L.Marker)
|
||||
window.oms.removeMarker(feature);
|
||||
});
|
||||
plugin.playerTracker.drawnTracesRes.eachLayer(function(feature) {
|
||||
if(feature instanceof L.Marker)
|
||||
window.oms.removeMarker(feature);
|
||||
});
|
||||
|
||||
plugin.playerTracker.drawnTracesEnl.clearLayers();
|
||||
plugin.playerTracker.drawnTracesRes.clearLayers();
|
||||
plugin.playerTracker.drawData();
|
||||
|
Reference in New Issue
Block a user