Creating Tracking Dashboard


i want to show truck history and travelled distance in my current use case in node red.
secondly want to create a geofence which shows alarms when object moves outside the zone area. And displays the alarm in some window.

[{"id":"948c19fd.656978","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"a6bd1056.7a54b","type":"buffer-parser","z":"948c19fd.656978","name":"Bulid Tags","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"byte","name":"lat","offset":6,"length":3,"offsetbit":0,"scale":1,"mask":""},{"type":"byte","name":"lon","offset":9,"length":3,"offsetbit":0,"scale":1,"mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"","resultType":"keyvalue","resultTypeType":"output","multipleResult":false,"setTopic":true,"x":310,"y":40,"wires":[[]]},{"id":"1c43457f.35d48b","type":"debug","z":"948c19fd.656978","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":710,"y":280,"wires":[]},{"id":"12cedc4.9f64f24","type":"inject","z":"948c19fd.656978","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"applicationID\":\"1\",\"applicationName\":\"cloud\",\"data\":\"A0hWgAAMEOw8Ld8oA+VZHQ==\",\"devEUI\":\"20635f01d1000002\",\"deviceName\":\"abeeway tracker\",\"fCnt\":165,\"fPort\":18,\"rxInfo\":[{\"altitude\":0,\"latitude\":0,\"loRaSNR\":10,\"longitude\":0,\"mac\":\"24e124fffef0a78e\",\"name\":\"24e124fffef0a78e\",\"rssi\":-37,\"time\":\"2020-11-16T16:44:17.135923Z\"}],\"time\":\"2020-11-16T16:44:17.135923Z\",\"txInfo\":{\"adr\":true,\"codeRate\":\"4/5\",\"dataRate\":{\"bandwidth\":125,\"modulation\":\"LORA\",\"spreadFactor\":7},\"frequency\":865985000}}","payloadType":"json","x":170,"y":260,"wires":[["7391a46d.3dc1cc"]]},{"id":"57ab21ed.7f5f5","type":"worldmap","z":"948c19fd.656978","name":"","lat":"","lon":"","zoom":"","layer":"","cluster":"","maxage":"","usermenu":"show","layers":"show","panit":"false","panlock":"false","zoomlock":"false","hiderightclick":"false","coords":"false","showgrid":"false","path":"/worldmap","x":560,"y":460,"wires":[]},{"id":"7391a46d.3dc1cc","type":"function","z":"948c19fd.656978","name":"","func":"var t=msg.payload;\nmsg.payload=t.data;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":304,"y":332,"wires":[["b73a6d75.a6c25"]]},{"id":"b73a6d75.a6c25","type":"base64","z":"948c19fd.656978","name":"","action":"","property":"payload","x":464,"y":312,"wires":[["7266696e.291da8"]]},{"id":"7266696e.291da8","type":"buffer-parser","z":"948c19fd.656978","name":"Bulid Tags","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"byte","name":"lat","offset":6,"length":3,"offsetbit":0,"scale":1,"mask":""},{"type":"byte","name":"lon","offset":9,"length":3,"offsetbit":0,"scale":1,"mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"","resultType":"keyvalue","resultTypeType":"output","multipleResult":false,"setTopic":true,"x":404,"y":392,"wires":[["7e0c7d77.222b34"]]},{"id":"7e0c7d77.222b34","type":"function","z":"948c19fd.656978","name":"","func":"var lat = (msg.payload.lat[0] << 24)  + (msg.payload.lat[1] << 16) + (msg.payload.lat[2] << 8) \nvar lon = (msg.payload.lon[0] << 24)  + (msg.payload.lon[1] << 16) + (msg.payload.lon[2] << 8) \n\nif (lat > 0x7FFFFFFF) { \n  lat -= 0x100000000;\n}\n\nif (lon > 0x7FFFFFFF) {\n  lon -= 0x100000000;\n}\n\nlat /= 10000000; \nlon /= 10000000;\n\nmsg.payload.lat = lat ;\nmsg.payload.lon = lon ;\nmsg.payload.name = \"apple\"; //set name\nmsg.payload.icon = \"fa-truck\";  //set icon\nmsg.payload.marker = \"layer\"; //set marker\n\n//return msg.payload; WRONG - always return msg!\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":584,"y":372,"wires":[["57ab21ed.7f5f5","1c43457f.35d48b"]]}]