I have a world map flow I have been using for a while that pulls in all of the buses and light rail vehicles for my area. I have it running in two different systems. I upgraded both of them to the latest world map (1.5.21) yesterday to have the labels display. After upgrading, one of the system no longer populates the buses and light rail vehicles if I am using the default endpoint of "worldmap" (e.g. http://ip_address:1880/worldmap). It will show the map but just doesn't populate items on it. If I change it to use any other end point (I have done "test" and "worldmap1") then it works fine.
I have deleted the node and installed it again but I still have the same issue. I'm at a loss of where to even look. Here is my flow. If you want to see if it works you will need to register for a free developer account with TriMet (our local transportation company) here. Then, in the HTTP Request node called "TriMet Vehicles", set the URL to https://developer.trimet.org/ws/v2/vehicles?appID=XXX (replace XXX with the App ID you get after registering).
Since it works on my other system I'm thinking there isn't anything wrong with my flow and instead there is something wrong with the Worldmap node on my system. I set the logging to Trace (trace-log.txt (9.0 KB)) but nothing in there stands out.
[
{
"id": "1a4dbfa0.d530e",
"type": "inject",
"z": "760c2358.b1be0c",
"name": "",
"topic": "",
"payload": "",
"payloadType": "date",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": "",
"x": 205,
"y": 138,
"wires": [
[
"73f24af1.c342a4"
]
]
},
{
"id": "73f24af1.c342a4",
"type": "http request",
"z": "760c2358.b1be0c",
"name": "TriMet Vehicles",
"method": "GET",
"ret": "obj",
"url": "https://developer.trimet.org/ws/v2/vehicles?appID=XXX",
"tls": "",
"x": 425,
"y": 138,
"wires": [
[
"6e4d0019.c7d57"
]
]
},
{
"id": "6e4d0019.c7d57",
"type": "function",
"z": "760c2358.b1be0c",
"name": "",
"func": "var trimet = [];\nfor(i=0;i<msg.payload.resultSet.vehicle.length;i++)\n{\n var p = msg.payload.resultSet.vehicle[i];\n var temp =\n {\n expires: p.expires,\n name: p.signMessage,\n serviceDate: p.serviceDate,\n loadPercentage: p.loadPercentage,\n lat: p.latitude,\n nextStopSeq: p.nextStopSeq,\n source: p.source,\n icon: p.type.startsWith(\"rail\") ? \"train\" : p.type,\n blockID: p.blockID,\n signMessageLong: p.signMessageLong,\n lastLocID: p.lastLocID,\n nextLocID: p.nextLocID,\n locationInScheduleDay: p.locationInScheduleDay,\n newTrip: p.newTrip,\n lon: p.longitude,\n direction: p.direction,\n inCongestion: p.inCongestion,\n routeNumber: p.routeNumber,\n bearing: p.bearing,\n garage: p.garage,\n tripID: p.tripID,\n delay: p.delay,\n extraBlockID: p.extraBlockID,\n messageCode: p.messageCode,\n lastStopSeq: p.lastStopSeq,\n vehicleID: p.vehicleID,\n time: p.time,\n offRoute: p.offRoute,\n iconColor: p.type.startsWith(\"rail\") ? \"Blue\" : \"Green\",\n layer: p.type.startsWith(\"rail\") ? \"Light Rail\" : \"Bus\",\n label: p.signMessage\n };\n trimet.push(temp);\n}\n\nmsg.payload = trimet;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 695,
"y": 138,
"wires": [
[
"2cfa2463.5dc66c"
]
]
},
{
"id": "2cfa2463.5dc66c",
"type": "split",
"z": "760c2358.b1be0c",
"name": "",
"splt": ",}",
"x": 835,
"y": 138,
"wires": [
[
"fe7bb0e0.bed5c"
]
]
},
{
"id": "fe7bb0e0.bed5c",
"type": "worldmap",
"z": "760c2358.b1be0c",
"name": "",
"lat": "45.512794",
"lon": "-122.679565",
"zoom": "12",
"layer": "OSM",
"cluster": "12",
"maxage": "",
"usermenu": "show",
"layers": "show",
"panit": "false",
"panlock": "false",
"zoomlock": "false",
"path": "/worldmap1",
"x": 1034,
"y": 140,
"wires": []
},
{
"id": "a14df397.474a4",
"type": "worldmap in",
"z": "760c2358.b1be0c",
"name": "",
"path": "/worldmap1",
"x": 187,
"y": 200,
"wires": [
[
"73f24af1.c342a4"
]
]
}
]