Worldmap spamming bounds since v2.18

Hi,

Since v2.18 of worldmap. the 'worldmap in' node is spamming action:"bounds" messages from the moment there is a connection with worldmap. This causes my flows to cease working. Do I have to alter something since version 2.18?
Thanks in advance
(for the moment putted v2.17.3 in my dockerfile to be able to continue working)

yes this was added recently - it should only report when the map zooms or moves.
How bad is the spamming ?

I will add a flag to make it optional - but not sure if to add it to the in node or somehow cram into the main map node.

Hi,

It happens straight after connection with the worldmap.
The spamming is a continuous flow (>50msg/sec). And it stops a few seconds after closing worldmap, depending on how many messages still need to be processed after closing worldmap.

If any additional info is required, I'll be happy to provide it.

greetings,

Is it dynamically updating the position or something ? Are the bounds inputs causing the map to then reposition/redraw (and thus go into a loop) by some feedback mechanism ?

are you able to share your flow at all - or just the relevant parts.

I tracked down the function that was causing this loop with the new bounds message.

[
    {
        "id": "488c966fd330b21d",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": ""
    },
    {
        "id": "d61c8a1eccdb83b0",
        "type": "worldmap in",
        "z": "488c966fd330b21d",
        "name": "",
        "path": "/worldmap",
        "events": "all",
        "x": 60,
        "y": 260,
        "wires": [
            [
                "17314806.c732c8",
                "01f6d95612cf3cc9"
            ]
        ]
    },
    {
        "id": "cea88ba6ea332f01",
        "type": "worldmap",
        "z": "488c966fd330b21d",
        "name": "",
        "lat": "",
        "lon": "",
        "zoom": "",
        "layer": "",
        "cluster": "",
        "maxage": "",
        "usermenu": "show",
        "layers": "show",
        "panit": "false",
        "panlock": "false",
        "zoomlock": "false",
        "hiderightclick": "false",
        "coords": "none",
        "showgrid": "false",
        "allowFileDrop": "false",
        "path": "/worldmap",
        "mapname": "",
        "mapurl": "",
        "mapopt": "",
        "mapwms": false,
        "x": 620,
        "y": 260,
        "wires": []
    },
    {
        "id": "17314806.c732c8",
        "type": "debug",
        "z": "488c966fd330b21d",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "x": 310,
        "y": 360,
        "wires": []
    },
    {
        "id": "01f6d95612cf3cc9",
        "type": "function",
        "z": "488c966fd330b21d",
        "name": "switch-button function",
        "func": "\nmsg.payload = { command :\n{button :\n    {   name:\"switch-button\",\n        icon: \"fa-exchange\", \n        position:\"bottomright\"\n    }  \n}\n};  \n\nnode.send(msg);\n\nmsg.payload = { command :\n{button :\n    {   name:\"clear-button\",\n        icon: \"fa-trash\", \n        position:\"bottomright\",\n       \n    }  \n}\n};  \n\nnode.send(msg);",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 320,
        "y": 260,
        "wires": [
            [
                "cea88ba6ea332f01"
            ]
        ]
    }
]

I have put it behind a if connected function now, so that solved the problem.

[
    {
        "id": "488c966fd330b21d",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": ""
    },
    {
        "id": "d61c8a1eccdb83b0",
        "type": "worldmap in",
        "z": "488c966fd330b21d",
        "name": "",
        "path": "/worldmap",
        "events": "all",
        "x": 60,
        "y": 260,
        "wires": [
            [
                "f1c7c2f7345e9d37",
                "cc9fc1d10ed7792f",
                "deaa8eef7672854e",
                "88a09b78235a26df",
                "6edc3271cd520e71",
                "17314806.c732c8"
            ]
        ]
    },
    {
        "id": "cea88ba6ea332f01",
        "type": "worldmap",
        "z": "488c966fd330b21d",
        "name": "",
        "lat": "",
        "lon": "",
        "zoom": "",
        "layer": "",
        "cluster": "",
        "maxage": "",
        "usermenu": "show",
        "layers": "show",
        "panit": "false",
        "panlock": "false",
        "zoomlock": "false",
        "hiderightclick": "false",
        "coords": "none",
        "showgrid": "false",
        "allowFileDrop": "false",
        "path": "/worldmap",
        "mapname": "",
        "mapurl": "",
        "mapopt": "",
        "mapwms": false,
        "x": 1940,
        "y": 160,
        "wires": []
    },
    {
        "id": "f1c7c2f7345e9d37",
        "type": "function",
        "z": "488c966fd330b21d",
        "name": "if start",
        "func": "if (msg.payload.action == \"button\") {\n\n    if (msg.payload.name == \"start-button\")\n    {\n        global.set('blink_delay', 1000);\n        return msg;   \n    }\n    \n} \n\n\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 250,
        "y": 60,
        "wires": [
            [
                "e3ee327ba5ebd234",
                "6d58eb1c27a1878c"
            ]
        ]
    },
    {
        "id": "b069d203ebad146c",
        "type": "function",
        "z": "488c966fd330b21d",
        "name": "start-button function",
        "func": "msg.payload = { command :\n{button :\n    {   name:\"start-button\",\n        icon: \"fa-play\", \n        position:\"bottomright\"\n    }  \n}\n};  \n\nreturn msg;\n\n\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1060,
        "y": 160,
        "wires": [
            [
                "cea88ba6ea332f01"
            ]
        ]
    },
    {
        "id": "01f6d95612cf3cc9",
        "type": "function",
        "z": "488c966fd330b21d",
        "name": "switch-button function",
        "func": "\nmsg.payload = { command :\n{button :\n    {   name:\"switch-button\",\n        icon: \"fa-exchange\", \n        position:\"bottomright\"\n    }  \n}\n};  \n\nnode.send(msg);\n\nmsg.payload = { command :\n{button :\n    {   name:\"clear-button\",\n        icon: \"fa-trash\", \n        position:\"bottomright\",\n       \n    }  \n}\n};  \n\nnode.send(msg);",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1060,
        "y": 200,
        "wires": [
            [
                "cea88ba6ea332f01"
            ]
        ]
    },
    {
        "id": "8d88da192ccd97ab",
        "type": "worldmap-tracks",
        "z": "488c966fd330b21d",
        "name": "track",
        "depth": "100000",
        "layer": "single",
        "smooth": false,
        "x": 1470,
        "y": 220,
        "wires": [
            [
                "cea88ba6ea332f01"
            ]
        ]
    },
    {
        "id": "e3ee327ba5ebd234",
        "type": "function",
        "z": "488c966fd330b21d",
        "name": "remove start - add others",
        "func": "\nmsg.payload = { command :\n{button :\n    {   \n        name:\"start-button\",\n    }  \n}\n};  \nnode.send(msg);\n\nmsg.payload = { command :\n{button :\n    {   name:\"ff-button\",\n        icon: \"fa-fast-forward\", \n        position:\"bottomright\"\n    }  \n}\n};    \nnode.send(msg);\n\n\nmsg.payload = { command :\n{button :\n    {   name:\"nf-button\",\n        icon: \"fa-step-forward\", \n        position:\"bottomright\"\n    }  \n}\n};    \nnode.send(msg);\n\n\nmsg.payload = { command :\n{button :\n    {   name:\"replay-button\",\n        icon: \"fa-repeat\", \n        position:\"bottomright\"\n    }  \n}\n};    \nnode.send(msg);\n\n\nmsg.payload = { command :\n{button :\n    {   name:\"stop-button\",\n        icon: \"fa-stop\", \n        position:\"bottomright\"\n    }  \n}\n};    \nnode.send(msg);\n\n\nmsg.payload = { command :\n{button :\n    {   name:\"pause-button\",\n        icon: \"fa-pause\", \n        position:\"bottomright\"\n    }  \n}\n};    \nnode.send(msg);\n\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1070,
        "y": 40,
        "wires": [
            [
                "cea88ba6ea332f01"
            ]
        ]
    },
    {
        "id": "cc9fc1d10ed7792f",
        "type": "function",
        "z": "488c966fd330b21d",
        "name": "if replay",
        "func": "if (msg.payload.action == \"button\") {\n\n    if (msg.payload.name == \"replay-button\")\n    {\n        global.set('blink_delay', 1000);\n        return msg;   \n    }\n    \n} \n\n\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 260,
        "y": 100,
        "wires": [
            [
                "6d58eb1c27a1878c"
            ]
        ]
    },
    {
        "id": "deaa8eef7672854e",
        "type": "function",
        "z": "488c966fd330b21d",
        "name": "if pause",
        "func": "if (msg.payload.action == \"button\") {\n    var rate = global.get('rate_pause')||600;\n    if (msg.payload.name == \"pause-button\")\n    {\n        if(rate == 10000000)\n        {\n            rate = 600;\n            global.set('blink_delay', 1000);\n        }\n        else\n        {\n            rate = 10000000;\n            global.set('blink_delay', 2000);\n        }\n        msg.rate = rate\n        global.set('rate_pause', rate);\n        return msg;   \n    }\n    \n} \n\n\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 260,
        "y": 140,
        "wires": [
            []
        ]
    },
    {
        "id": "88a09b78235a26df",
        "type": "function",
        "z": "488c966fd330b21d",
        "name": "if stop",
        "func": "if (msg.payload.action == \"button\") {\n    var rate = global.get('rate_pause')||300;\n    if (msg.payload.name == \"stop-button\")\n    {\n        if(rate == 10000000)\n        {\n            rate = 150;\n            global.set('blink_delay', 1000);\n        }\n        else\n        {\n            rate = 10000000;\n            global.set('blink_delay', 2000);\n        }\n        msg.rate = rate\n        global.set('rate_pause', rate);\n        \n        return msg;   \n    }\n    \n} \n\n\n\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 250,
        "y": 180,
        "wires": [
            [
                "b069d203ebad146c",
                "62d2d1501d6bd267",
                "6d58eb1c27a1878c"
            ]
        ]
    },
    {
        "id": "62d2d1501d6bd267",
        "type": "function",
        "z": "488c966fd330b21d",
        "name": "remove buttons",
        "func": "msg.payload = { command :\n{button :\n    {   \n        name:\"replay-button\",\n    }  \n}\n};  \nnode.send(msg);\n\nmsg.payload = { command :\n{button :\n    {   \n        name:\"ff-button\",\n    }  \n}\n};  \nnode.send(msg);\n\nmsg.payload = { command :\n{button :\n    {   \n        name:\"nf-button\",\n    }  \n}\n};  \nnode.send(msg);\n\nmsg.payload = { command :\n{button :\n    {   \n        name:\"stop-button\",\n    }  \n}\n};  \nnode.send(msg);\n\nmsg.payload = { command :\n{button :\n    {   \n        name:\"pause-button\",\n    }  \n}\n};  \nnode.send(msg);\n\n//return [msg1, msg2, msg3, msg4, msg5];",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1040,
        "y": 120,
        "wires": [
            [
                "cea88ba6ea332f01"
            ]
        ]
    },
    {
        "id": "6d58eb1c27a1878c",
        "type": "function",
        "z": "488c966fd330b21d",
        "name": "clear map",
        "func": "msg.payload = { command :\n\n    {  \n        \n        clear:\"height control\"\n    }  \n\n};  \nnode.send(msg);\n\nglobal.set('marker_id', 0);\n\nmsg.payload = { command :\n\n    {  \n        \n        clear:\"Tracks\"\n    }  \n\n}; \nnode.send(msg);\n\nmsg.payload = { command :\n\n    {  \n        \n        clear:\"tracks\"\n    }  \n\n};  \n\nnode.send(msg);\n\nmsg.payload = { command :\n\n    {  \n        clear:\"boundary points\"\n    }  \n\n};  \n\nnode.send(msg);",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1020,
        "y": 80,
        "wires": [
            [
                "8d88da192ccd97ab",
                "cea88ba6ea332f01"
            ]
        ]
    },
    {
        "id": "17314806.c732c8",
        "type": "debug",
        "z": "488c966fd330b21d",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "x": 310,
        "y": 320,
        "wires": []
    },
    {
        "id": "6edc3271cd520e71",
        "type": "function",
        "z": "488c966fd330b21d",
        "name": "if connected",
        "func": "if(msg.payload.action == \"connected\")\n{\n    return msg;\n}",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 650,
        "y": 200,
        "wires": [
            [
                "b069d203ebad146c",
                "01f6d95612cf3cc9"
            ]
        ]
    }
]

A way to turn that off might be an option as it does highten the load with information that is not always needed.

I have a flow that has the possibility to replay a saved geojason file. it splits all the coordinates into separate messages and plots them on the map connected with a line on a regular interval that is adjustable with the buttons. So every plotted coordinate is making the map move and gives me an additional bounds message. (my testfile contains almost 7000 points)

Node red is running in balena with a few other containers, so every time I do an adjustment in the dockerfile of node-red, the latest releases are being build (unless I start to specify the versions in the dockerfile) and this can reveal some badly made function nodes like it did now.

If I want to post the whole flow with additional files, I have to inform first cause I'm bound by a nda. (student doing an internship)

But conclusion is I found the problem that conflicted with the new bounds message.

Thanks for pointing me in the right direction.

1 Like

Great - well done. and yes I'll look to add an extra filter option.

1 Like

Now done. As a separate option within worldmap input node

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.