Skip to content

Commit

Permalink
Merge pull request #1604 from pierotofy/plugfix
Browse files Browse the repository at this point in the history
Fix contours, objdetect plugins
  • Loading branch information
pierotofy authored Feb 15, 2025
2 parents beb7ded + d6b05e0 commit 6f14e0c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion coreplugins/contours/public/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ PluginsAPI.Map.willAddControls([
'contours/build/Contours.css'
], function(args, Contours){
var tasks = [];
var ids = {};

for (var i = 0; i < args.tiles.length; i++){
tasks.push(args.tiles[i].meta.task);
var task = args.tiles[i].meta.task;
if (!ids[task.id]){
tasks.push(task);
ids[task.id] = true;
}
}

// TODO: add support for map view where multiple tasks are available?
Expand Down
8 changes: 7 additions & 1 deletion coreplugins/objdetect/public/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ PluginsAPI.Map.willAddControls([
'objdetect/build/ObjDetect.css'
], function(args, ObjDetect){
var tasks = [];
var ids = {};

for (var i = 0; i < args.tiles.length; i++){
tasks.push(args.tiles[i].meta.task);
var task = args.tiles[i].meta.task;
if (!ids[task.id]){
tasks.push(task);
ids[task.id] = true;
}
}

// TODO: add support for map view where multiple tasks are available?
Expand Down

0 comments on commit 6f14e0c

Please sign in to comment.