dceejay / RedMap

A web map app for Node-RED to put blobs on
Apache License 2.0
110 stars 61 forks source link

Error to upgrade at v4.8 #277

Open niconandin opened 3 months ago

niconandin commented 3 months ago

Dont Work the LineString in GeoJSON

dceejay commented 3 months ago

can you provide an example flow showing this error ? thanks

dceejay commented 1 week ago

Any update? Ok to close ?

niconandin commented 1 week ago

Excuse me for the delay. I'll give you the code that worked correctly before updating. I clarify that there are approximately 35,000 lines that he draws.

[ { "id": "9fb08eca682eca86", "type": "group", "z": "2f29241d366af3b2", "name": "", "style": { "stroke": "#ffff00", "label": true }, "nodes": [ "6fcffe0d4b739f97", "068e6ba2b79a39f4", "67a87926eb69b502", "4b4c10370e4ffd48", "d5bf94869d2609a1", "b9a0768a2684af63", "74d2d44a4bca16fb", "c947572306fcb7a8", "89813d75fae13e1f", "5b8d8c623fa88bee", "cb1cf6ba58ee8e3c", "38adaf60911c3f35", "d3f1a769f8cf22c7", "2f055a29abc4d28d", "9e4642c0e95af637", "6bec290a6f8a5df6", "044d27e1bdf07f13", "4763bf76e7db3ac5", "da69c8384375f78b" ], "x": 1174, "y": 19, "w": 1012, "h": 322 }, { "id": "6fcffe0d4b739f97", "type": "comment", "z": "2f29241d366af3b2", "g": "9fb08eca682eca86", "name": "DIBUJA LINEAS", "info": "", "x": 1400, "y": 60, "wires": [] }, { "id": "068e6ba2b79a39f4", "type": "worldmap in", "z": "2f29241d366af3b2", "d": true, "g": "9fb08eca682eca86", "name": "", "path": "/worldmap", "events": "connect", "x": 1300, "y": 160, "wires": [ [ "4b4c10370e4ffd48" ] ] }, { "id": "67a87926eb69b502", "type": "link in", "z": "2f29241d366af3b2", "d": true, "g": "9fb08eca682eca86", "name": "falla_linea", "links": [ "010ff67cefac3a84", "040f288e667c79b8", "6dbcbe006b6552ac", "82a35af6342a525a" ], "x": 1345, "y": 200, "wires": [ [ "4b4c10370e4ffd48" ] ] }, { "id": "4b4c10370e4ffd48", "type": "function", "z": "2f29241d366af3b2", "g": "9fb08eca682eca86", "name": "FALLA_LINEA", "func": "//msg.topic = \"SELECT FROM _Gis_Alimentadores WHERE falla = 1\"\nmsg.topic = \"SELECT FROM _Gis_Alimentadores\"\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1500, "y": 120, "wires": [ [ "d5bf94869d2609a1" ] ] }, { "id": "d5bf94869d2609a1", "type": "mysql", "z": "2f29241d366af3b2", "g": "9fb08eca682eca86", "mydb": "", "name": "", "x": 1660, "y": 120, "wires": [ [ "74d2d44a4bca16fb", "c947572306fcb7a8" ] ] }, { "id": "b9a0768a2684af63", "type": "inject", "z": "2f29241d366af3b2", "d": true, "g": "9fb08eca682eca86", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": "1", "topic": "", "payload": "", "payloadType": "date", "x": 1280, "y": 240, "wires": [ [ "4b4c10370e4ffd48" ] ] }, { "id": "74d2d44a4bca16fb", "type": "function", "z": "2f29241d366af3b2", "g": "9fb08eca682eca86", "name": "function 317", "func": "var falla_linea = msg.payload\nfor (var i = 0; i < msg.payload.length; i++) {\n if (msg.payload[i].falla == 1) {\n falla_linea[i] = msg.payload[i]\n } else {\n falla_linea[i].id = 0\n falla_linea[i].numero = 0\n falla_linea[i].capa = 99\n falla_linea[i].falla = 0\n falla_linea[i].Descripcion = \"SIN FALLAS\"}\n}\nmsg.falla_linea = falla_linea;\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1830, "y": 120, "wires": [ [ "5b8d8c623fa88bee" ] ] }, { "id": "c947572306fcb7a8", "type": "debug", "z": "2f29241d366af3b2", "g": "9fb08eca682eca86", "name": "debug 319", "active": false, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1830, "y": 80, "wires": [] }, { "id": "89813d75fae13e1f", "type": "ui_ui_control", "z": "2f29241d366af3b2", "d": true, "g": "9fb08eca682eca86", "name": "", "events": "all", "x": 1300, "y": 120, "wires": [ [ "4b4c10370e4ffd48" ] ] }, { "id": "5b8d8c623fa88bee", "type": "function", "z": "2f29241d366af3b2", "g": "9fb08eca682eca86", "name": "function 323", "func": "//msg.topic = \"SELECT FROM _Gis_Lineas\"\n//msg.topic = \"SELECT FROM _Gis_Lineas_V3\"\nmsg.topic = \"SELECT * FROM _Gis_Lineas_V3\"\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1510, "y": 200, "wires": [ [ "cb1cf6ba58ee8e3c" ] ] }, { "id": "cb1cf6ba58ee8e3c", "type": "mysql", "z": "2f29241d366af3b2", "g": "9fb08eca682eca86", "mydb": "", "name": "", "x": 1660, "y": 200, "wires": [ [ "38adaf60911c3f35" ] ] }, { "id": "38adaf60911c3f35", "type": "function", "z": "2f29241d366af3b2", "g": "9fb08eca682eca86", "name": "ELIMINAR DIBUJOS ANTERIORES", "func": "var capa = { \"name\":\"falla\",\"delete\":true };\nvar capa2 = { \"name\":\"sin_fallas\",\"delete\":true };\n\nreturn [{payload:capa},{payload:capa2}];", "outputs": 2, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1910, "y": 200, "wires": [ [ "d3f1a769f8cf22c7" ], [ "d3f1a769f8cf22c7" ] ] }, { "id": "d3f1a769f8cf22c7", "type": "link out", "z": "2f29241d366af3b2", "g": "9fb08eca682eca86", "name": "linea_falla", "links": [ "98a46d4b0f9d8d7a", "3d5fcb48cd97a9de", "95e29b73c9f34e3c", "7e0e420dcb8f81f4", "5c8ac6f5db9b6f87" ], "x": 2090, "y": 200, "wires": [] }, { "id": "2f055a29abc4d28d", "type": "link in", "z": "2f29241d366af3b2", "g": "9fb08eca682eca86", "name": "lineas", "links": [ "7e0e420dcb8f81f4", "98a46d4b0f9d8d7a", "3d5fcb48cd97a9de", "95e29b73c9f34e3c", "5c8ac6f5db9b6f87" ], "x": 1350, "y": 280, "wires": [ [ "6bec290a6f8a5df6" ] ] }, { "id": "9e4642c0e95af637", "type": "link in", "z": "2f29241d366af3b2", "d": true, "g": "9fb08eca682eca86", "name": "in_linea", "links": [ "343ce23e6e8b2e7c", "7fa27c9e3b54d3f6" ], "x": 1555, "y": 280, "wires": [ [ "044d27e1bdf07f13" ] ] }, { "id": "6bec290a6f8a5df6", "type": "function", "z": "2f29241d366af3b2", "g": "9fb08eca682eca86", "name": "FALLA O NO FALLA", "func": "var msg2 = []\nvar linea = {name:\"falla\",latlng:[]};\nvar linea2 = {name:\"sin_fallas\",latlng:[]};\n\nfor (var i = 0; i < msg.payload.length; i++) {\n if (msg.payload[i].falla == 1) {\n linea.latlng.push([msg.payload[i].latini,msg.payload[i].lonini])\n linea.latlng.push([msg.payload[i].latfin,msg.payload[i].lonfin])\n msg2[i] = {payload:linea};\n } else {\n linea2.latlng.push([msg.payload[i].latini,msg.payload[i].lonini])\n linea2.latlng.push([msg.payload[i].latfin,msg.payload[i].lonfin])\n msg2[i] = {payload:linea2};\n }\n}\nreturn msg2;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 1510, "y": 320, "wires": [ [ "4763bf76e7db3ac5" ] ] }, { "id": "044d27e1bdf07f13", "type": "debug", "z": "2f29241d366af3b2", "g": "9fb08eca682eca86", "name": "debug 331", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1700, "y": 280, "wires": [] }, { "id": "4763bf76e7db3ac5", "type": "link out", "z": "2f29241d366af3b2", "g": "9fb08eca682eca86", "name": "capa_linea", "links": [ "f159b44590562088" ], "x": 1690, "y": 320, "wires": [] }, { "id": "da69c8384375f78b", "type": "debug", "z": "2f29241d366af3b2", "name": "debug 318", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1480, "y": 340, "wires": [] } ]