{"theJson":"var af = null;\nvar el = null;\nvar p = null;\nvar m = null;\nvar gj = null;\nvar counter = 0;\nvar bearing = 0;\n\nvar trackNav = '\/img\/navigation.png';\nvar trackDot = '\/img\/dot-black.gif';\nvar currentStyle = map.getStyle();\n\nif (currentStyle !== undefined && currentStyle != null && JSON.stringify(currentStyle).indexOf(\"satellite-\") != -1) {\n trackNav = '\/img\/navigation-yellow.png';\n trackDot = '\/img\/dot-yellow.gif';\n}\n\nvar picList = $('#trip-pics-list');\npicList.html('

<\/i><\/p>

Loading Previews...<\/p>');\nvar plHtml = '';\n\n gj = {\"type\":\"Feature\",\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[\"-99.12283\",\"19.48688\",2247.5],[\"-99.12281\",\"19.48695\",2243.6],[\"-99.12715\",\"19.48373\",2250.1],[\"-99.12713\",\"19.48369\",2243.1],[\"-99.12722\",\"19.48252\",2246.3],[\"-99.10574\",\"19.51008\",2263.8],[\"-99.06493\",\"19.55229\",2277.6],[\"-99.04185\",\"19.58705\",2275.2],[\"-99.03748\",\"19.60390\",2231.6],[\"-99.02863\",\"19.62003\",2261.9],[\"-99.02854\",\"19.62004\",2238.5],[\"-99.02375\",\"19.62955\",2250.3],[\"-98.98198\",\"19.68441\",2316.4],[\"-98.94602\",\"19.74317\",2261],[\"-98.94679\",\"19.80691\",2341.9],[\"-98.93874\",\"19.87608\",2325],[\"-98.89711\",\"19.92625\",2327.7],[\"-98.84999\",\"19.97716\",2347.6],[\"-98.80694\",\"20.02612\",2362.7],[\"-98.77680\",\"20.07451\",2364.3],[\"-98.77067\",\"20.10747\",2383.1],[\"-98.81002\",\"20.13313\",2453.6],[\"-98.77449\",\"20.14667\",2608],[\"-98.75438\",\"20.15504\",2734],[\"-98.75352\",\"20.17799\",2748.8],[\"-98.74785\",\"20.18262\",2761.7],[\"-98.74389\",\"20.18320\",2790.6],[\"-98.74490\",\"20.18305\",2791.4],[\"-98.74388\",\"20.18323\",2801.5],[\"-98.74570\",\"20.18431\",2782.5],[\"-98.75119\",\"20.18079\",2759.1],[\"-98.75769\",\"20.16784\",2780.6],[\"-98.76531\",\"20.14977\",2735.1],[\"-98.79626\",\"20.13721\",2540.9],[\"-98.81343\",\"20.12417\",2468.1],[\"-98.81003\",\"20.10251\",2502.2],[\"-98.79095\",\"20.06857\",2368.2],[\"-98.79438\",\"20.04231\",2351.5],[\"-98.79480\",\"20.04141\",2346.8],[\"-98.82787\",\"20.00431\",2371.8],[\"-98.86634\",\"19.95624\",2328.8],[\"-98.91803\",\"19.90897\",2316.8],[\"-98.94910\",\"19.85146\",2330],[\"-98.94630\",\"19.80929\",2312.4],[\"-98.94622\",\"19.74290\",2276.4],[\"-98.98221\",\"19.68495\",2302.9],[\"-99.02129\",\"19.63518\",2244.8],[\"-99.02958\",\"19.61940\",2242.9],[\"-99.03044\",\"19.61784\",2237.5],[\"-99.04799\",\"19.57524\",2273.8],[\"-99.08980\",\"19.52325\",2253.5],[\"-99.11923\",\"19.49774\",2220],[\"-99.12711\",\"19.48394\",2192.3],[\"-99.12839\",\"19.48278\",2243.4],[\"-99.11816\",\"19.46605\",2246.8],[\"-99.12337\",\"19.44023\",2244.7],[\"-99.13377\",\"19.42142\",2243.7],[\"-99.14157\",\"19.37063\",2246.7],[\"-99.13039\",\"19.35358\",2247.2],[\"-99.12858\",\"19.35385\",2247.8],[\"-99.13037\",\"19.35337\",2247.7],[\"-99.13717\",\"19.33836\",2248.3],[\"-99.12584\",\"19.31620\",2245.8],[\"-99.12953\",\"19.29445\",2235.8],[\"-99.13783\",\"19.30015\",2241.9],[\"-99.13837\",\"19.29890\",2248],[\"-99.13956\",\"19.32513\",2236.3],[\"-99.15073\",\"19.33550\",2248.3],[\"-99.15652\",\"19.33525\",2256],[\"-99.15434\",\"19.33297\",2250.6]]},\"properties\":{\"stroke\":\"#27f600\",\"stroke-opacity\":1,\"stroke-width\":2}};\n if (gj.type === 'Feature' && gj.geometry.type === 'LineString') {\n var sourceName = 'Combined Devices - c9b9-9ba2779c-b992-69d21852c6044';\n map.addSource(sourceName, { type: 'geojson', data: gj });\n\n \/\/ ['get', 'stroke']\n map.addLayer({\n id: 'Combined Devices - c9b9-9ba2779c-b992-69d21852c6044',\n source: sourceName,\n type: 'line',\n paint: {\n 'line-color': ['get', 'stroke'],\n 'line-width': ['get', 'stroke-width'],\n 'line-opacity': ['get', 'stroke-opacity'],\n },\n filter: [\"==\", \"$type\", \"LineString\"]\n });\n\n gj.geometry.coordinates.forEach(function(lngLat) {\n bounds.extend(lngLat);\n });\n\n layers.push('Combined Devices - c9b9-9ba2779c-b992-69d21852c6044');\n }\n af = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.12283\",\"19.48688\",2247.5]},\"properties\":{\"tripId\":116966,\"messageId\":43085009,\"messageDateTime\":\"2025-01-19 09:33:12\",\"messageDateTimeUTC\":\"2025-01-19T15:33:12Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"0.00\",\"kph\":0,\"knots\":0,\"bearing\":10,\"nearest\":null,\"messageText\":\"1:1:[11]:01-19 09:33:12 (1.076)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"fa-solid fa-star\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n if (af.type === 'Feature' && af.geometry.type === 'Point') {\n el = document.createElement('div');\n el.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: green; background-color: #fff; border-radius: 50%; border: 1px solid #000;\";\n el.innerHTML = '<\/i>';\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085009, 'TRACK'); });\n\n m = new mapboxgl.Marker({ 'element': el })\n .setLngLat(af.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(af.geometry.coordinates);\n markers.push(m);\n if (af.properties.smallPic !== undefined && af.properties.smallPic !== null && af.properties.smallPic.length > 0 && af.properties.largePic !== undefined && af.properties.largePic !== null && af.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + af.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(af.geometry.coordinates)\n .addTo(map);\n markers.push(m);\n markersWithPics.push(m);\n picListMarkers['0'] = m;\n plHtml += '

\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.12281\",\"19.48695\",2243.6]},\"properties\":{\"tripId\":116966,\"messageId\":43085015,\"messageDateTime\":\"2025-01-19 09:33:56\",\"messageDateTimeUTC\":\"2025-01-19T15:33:56Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"CUST\",\"messageTypeDescription\":\"Custom\",\"messageSource\":\"SWConnect\",\"mph\":\"0.00\",\"kph\":0,\"knots\":0,\"bearing\":15,\"nearest\":null,\"messageText\":\"\",\"smallPic\":\"https:\\\/\\\/s3.amazonaws.com\\\/storage-public.spotwalla.com\\\/prd\\\/pics\\\/15932\\\/d409a68632b0175b001ee290614915f7.jpg\",\"largePic\":\"https:\\\/\\\/s3.amazonaws.com\\\/storage-public.spotwalla.com\\\/prd\\\/pics\\\/15932\\\/d409a68632b0175b001ee290614915f7.jpg\",\"color\":\"yellow\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085015, 'CUST'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['1'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.12715\",\"19.48373\",2250.1]},\"properties\":{\"tripId\":116966,\"messageId\":43085038,\"messageDateTime\":\"2025-01-19 09:38:14\",\"messageDateTimeUTC\":\"2025-01-19T15:38:14Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"2.33\",\"kph\":3.7,\"knots\":2,\"bearing\":231,\"nearest\":null,\"messageText\":\"38:2:[27]:01-19 09:38:14 (0.046)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085038, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['2'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.12713\",\"19.48369\",2243.1]},\"properties\":{\"tripId\":116966,\"messageId\":43085078,\"messageDateTime\":\"2025-01-19 09:43:39\",\"messageDateTimeUTC\":\"2025-01-19T15:43:39Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"0.44\",\"kph\":0.7,\"knots\":0.4,\"bearing\":154,\"nearest\":null,\"messageText\":\"1:1:[11]:01-19 09:43:40 (1.330)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085078, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['3'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.12722\",\"19.48252\",2246.3]},\"properties\":{\"tripId\":116966,\"messageId\":43085208,\"messageDateTime\":\"2025-01-19 09:55:43\",\"messageDateTimeUTC\":\"2025-01-19T15:55:43Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"5.48\",\"kph\":8.8,\"knots\":4.8,\"bearing\":184,\"nearest\":null,\"messageText\":\"192:2:[13]:01-19 09:55:43 (0.050)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085208, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['4'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.10574\",\"19.51008\",2263.8]},\"properties\":{\"tripId\":116966,\"messageId\":43085251,\"messageDateTime\":\"2025-01-19 10:00:49\",\"messageDateTimeUTC\":\"2025-01-19T16:00:49Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"45.77\",\"kph\":73.7,\"knots\":39.8,\"bearing\":36,\"nearest\":null,\"messageText\":\"213:3:[19]:01-19 10:00:49 (0.842)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085251, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['5'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.06493\",\"19.55229\",2277.6]},\"properties\":{\"tripId\":116966,\"messageId\":43085278,\"messageDateTime\":\"2025-01-19 10:05:54\",\"messageDateTimeUTC\":\"2025-01-19T16:05:54Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"46.6\",\"kph\":\"75.0\",\"knots\":\"40.5\",\"bearing\":42,\"nearest\":null,\"messageText\":\"241:5:[23]:01-19 10:05:54 (0.856)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085278, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['6'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.04185\",\"19.58705\",2275.2]},\"properties\":{\"tripId\":116966,\"messageId\":43085324,\"messageDateTime\":\"2025-01-19 10:10:59\",\"messageDateTimeUTC\":\"2025-01-19T16:10:59Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"0.00\",\"kph\":0,\"knots\":0,\"bearing\":32,\"nearest\":null,\"messageText\":\"262:7:[14]:01-19 10:10:59 (0.066)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085324, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['7'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.03748\",\"19.60390\",2231.6]},\"properties\":{\"tripId\":116966,\"messageId\":43085349,\"messageDateTime\":\"2025-01-19 10:16:03\",\"messageDateTimeUTC\":\"2025-01-19T16:16:03Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"61.23\",\"kph\":98.5,\"knots\":53.2,\"bearing\":13,\"nearest\":null,\"messageText\":\"271:8:[4]:01-19 10:16:03 (0.851)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085349, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['8'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.02863\",\"19.62003\",2261.9]},\"properties\":{\"tripId\":116966,\"messageId\":43085531,\"messageDateTime\":\"2025-01-19 10:21:07\",\"messageDateTimeUTC\":\"2025-01-19T16:21:07Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"14.8\",\"kph\":\"23.9\",\"knots\":\"12.9\",\"bearing\":27,\"nearest\":null,\"messageText\":\"281:9:[14]:01-19 10:21:07 (0.848)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085531, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['9'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.02854\",\"19.62004\",2238.5]},\"properties\":{\"tripId\":116966,\"messageId\":43085570,\"messageDateTime\":\"2025-01-19 10:24:23\",\"messageDateTimeUTC\":\"2025-01-19T16:24:23Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"0.00\",\"kph\":0,\"knots\":0,\"bearing\":83,\"nearest\":null,\"messageText\":\"1:1:[3]:01-19 10:24:23 (1.334)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085570, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['10'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.02375\",\"19.62955\",2250.3]},\"properties\":{\"tripId\":116966,\"messageId\":43085607,\"messageDateTime\":\"2025-01-19 10:29:24\",\"messageDateTimeUTC\":\"2025-01-19T16:29:24Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"42.99\",\"kph\":69.2,\"knots\":37.4,\"bearing\":25,\"nearest\":null,\"messageText\":\"18:2:[14]:01-19 10:29:24 (0.556)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085607, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['11'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.98198\",\"19.68441\",2316.4]},\"properties\":{\"tripId\":116966,\"messageId\":43085649,\"messageDateTime\":\"2025-01-19 10:34:27\",\"messageDateTimeUTC\":\"2025-01-19T16:34:27Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"72.01\",\"kph\":115.9,\"knots\":62.6,\"bearing\":35,\"nearest\":null,\"messageText\":\"41:3:[18]:01-19 10:34:27 (0.048)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085649, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['12'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.94602\",\"19.74317\",2261]},\"properties\":{\"tripId\":116966,\"messageId\":43085690,\"messageDateTime\":\"2025-01-19 10:39:30\",\"messageDateTimeUTC\":\"2025-01-19T16:39:30Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"48.32\",\"kph\":77.8,\"knots\":42,\"bearing\":29,\"nearest\":null,\"messageText\":\"61:4:[18]:01-19 10:39:30 (0.053)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085690, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['13'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.94679\",\"19.80691\",2341.9]},\"properties\":{\"tripId\":116966,\"messageId\":43085725,\"messageDateTime\":\"2025-01-19 10:44:33\",\"messageDateTimeUTC\":\"2025-01-19T16:44:33Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"56.04\",\"kph\":90.2,\"knots\":48.7,\"bearing\":359,\"nearest\":null,\"messageText\":\"78:5:[19]:01-19 10:44:33 (0.070)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085725, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['14'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.93874\",\"19.87608\",2325]},\"properties\":{\"tripId\":116966,\"messageId\":43085761,\"messageDateTime\":\"2025-01-19 10:49:36\",\"messageDateTimeUTC\":\"2025-01-19T16:49:36Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"61.31\",\"kph\":98.7,\"knots\":53.3,\"bearing\":6,\"nearest\":null,\"messageText\":\"99:6:[14]:01-19 10:49:36 (0.031)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085761, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['15'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.89711\",\"19.92625\",2327.7]},\"properties\":{\"tripId\":116966,\"messageId\":43085804,\"messageDateTime\":\"2025-01-19 10:54:39\",\"messageDateTimeUTC\":\"2025-01-19T16:54:39Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"38.01\",\"kph\":61.2,\"knots\":33,\"bearing\":37,\"nearest\":null,\"messageText\":\"117:8:[14]:01-19 10:54:39 (0.031)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085804, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['16'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.84999\",\"19.97716\",2347.6]},\"properties\":{\"tripId\":116966,\"messageId\":43085837,\"messageDateTime\":\"2025-01-19 10:59:41\",\"messageDateTimeUTC\":\"2025-01-19T16:59:41Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"58.83\",\"kph\":94.7,\"knots\":51.1,\"bearing\":41,\"nearest\":null,\"messageText\":\"140:9:[20]:01-19 10:59:41 (0.026)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085837, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['17'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.80694\",\"20.02612\",2362.7]},\"properties\":{\"tripId\":116966,\"messageId\":43085878,\"messageDateTime\":\"2025-01-19 11:04:44\",\"messageDateTimeUTC\":\"2025-01-19T17:04:44Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"54.45\",\"kph\":87.6,\"knots\":47.3,\"bearing\":39,\"nearest\":null,\"messageText\":\"159:10:[14]:01-19 11:04:44 (0.029)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085878, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['18'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.77680\",\"20.07451\",2364.3]},\"properties\":{\"tripId\":116966,\"messageId\":43085911,\"messageDateTime\":\"2025-01-19 11:09:46\",\"messageDateTimeUTC\":\"2025-01-19T17:09:46Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"46.60\",\"kph\":75,\"knots\":40.5,\"bearing\":30,\"nearest\":null,\"messageText\":\"180:13:[20]:01-19 11:09:46 (0.033)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085911, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['19'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.77067\",\"20.10747\",2383.1]},\"properties\":{\"tripId\":116966,\"messageId\":43085960,\"messageDateTime\":\"2025-01-19 11:14:48\",\"messageDateTimeUTC\":\"2025-01-19T17:14:48Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"41.27\",\"kph\":66.4,\"knots\":35.9,\"bearing\":9,\"nearest\":null,\"messageText\":\"197:15:[14]:01-19 11:14:48 (0.027)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085960, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['20'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.81002\",\"20.13313\",2453.6]},\"properties\":{\"tripId\":116966,\"messageId\":43085994,\"messageDateTime\":\"2025-01-19 11:19:51\",\"messageDateTimeUTC\":\"2025-01-19T17:19:51Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"31.81\",\"kph\":51.2,\"knots\":27.6,\"bearing\":304,\"nearest\":null,\"messageText\":\"214:17:[14]:01-19 11:19:51 (0.029)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43085994, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['21'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.77449\",\"20.14667\",2608]},\"properties\":{\"tripId\":116966,\"messageId\":43086050,\"messageDateTime\":\"2025-01-19 11:24:55\",\"messageDateTimeUTC\":\"2025-01-19T17:24:55Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"43.91\",\"kph\":70.7,\"knots\":38.2,\"bearing\":67,\"nearest\":null,\"messageText\":\"242:18:[20]:01-19 11:24:55 (0.023)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43086050, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['22'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.75438\",\"20.15504\",2734]},\"properties\":{\"tripId\":116966,\"messageId\":43086096,\"messageDateTime\":\"2025-01-19 11:29:58\",\"messageDateTimeUTC\":\"2025-01-19T17:29:58Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"12.19\",\"kph\":19.6,\"knots\":10.6,\"bearing\":66,\"nearest\":null,\"messageText\":\"256:19:[14]:01-19 11:29:58 (0.026)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43086096, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['23'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.75352\",\"20.17799\",2748.8]},\"properties\":{\"tripId\":116966,\"messageId\":43086148,\"messageDateTime\":\"2025-01-19 11:35:01\",\"messageDateTimeUTC\":\"2025-01-19T17:35:01Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"21.34\",\"kph\":34.3,\"knots\":18.5,\"bearing\":2,\"nearest\":null,\"messageText\":\"270:21:[17]:01-19 11:35:01 (0.028)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43086148, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['24'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.74785\",\"20.18262\",2761.7]},\"properties\":{\"tripId\":116966,\"messageId\":43086200,\"messageDateTime\":\"2025-01-19 11:40:05\",\"messageDateTimeUTC\":\"2025-01-19T17:40:05Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"5.01\",\"kph\":8.1,\"knots\":4.4,\"bearing\":48,\"nearest\":null,\"messageText\":\"275:22:[28]:01-19 11:40:05 (0.034)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43086200, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['25'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.74389\",\"20.18320\",2790.6]},\"properties\":{\"tripId\":116966,\"messageId\":43086244,\"messageDateTime\":\"2025-01-19 11:45:11\",\"messageDateTimeUTC\":\"2025-01-19T17:45:11Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"0.00\",\"kph\":0,\"knots\":0,\"bearing\":81,\"nearest\":null,\"messageText\":\"278:23:[4]:01-19 11:45:11 (0.023)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43086244, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['26'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.74490\",\"20.18305\",2791.4]},\"properties\":{\"tripId\":116966,\"messageId\":43086372,\"messageDateTime\":\"2025-01-19 12:00:39\",\"messageDateTimeUTC\":\"2025-01-19T18:00:39Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"0.00\",\"kph\":0,\"knots\":0,\"bearing\":261,\"nearest\":null,\"messageText\":\"550:24:[4]:01-19 12:00:40 (0.051)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43086372, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['27'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.74388\",\"20.18323\",2801.5]},\"properties\":{\"tripId\":116966,\"messageId\":43088557,\"messageDateTime\":\"2025-01-19 16:08:26\",\"messageDateTimeUTC\":\"2025-01-19T22:08:26Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"5.61\",\"kph\":9,\"knots\":4.9,\"bearing\":79,\"nearest\":null,\"messageText\":\"7723:25:[4]:01-19 16:08:26 (1.127)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43088557, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['28'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.74570\",\"20.18431\",2782.5]},\"properties\":{\"tripId\":116966,\"messageId\":43088704,\"messageDateTime\":\"2025-01-19 16:28:29\",\"messageDateTimeUTC\":\"2025-01-19T22:28:29Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"3.87\",\"kph\":6.2,\"knots\":3.4,\"bearing\":302,\"nearest\":null,\"messageText\":\"8157:26:[22]:01-19 16:28:29 (0.046)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43088704, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['29'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.75119\",\"20.18079\",2759.1]},\"properties\":{\"tripId\":116966,\"messageId\":43088739,\"messageDateTime\":\"2025-01-19 16:33:33\",\"messageDateTimeUTC\":\"2025-01-19T22:33:33Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"2.89\",\"kph\":4.7,\"knots\":2.5,\"bearing\":235,\"nearest\":null,\"messageText\":\"8165:27:[13]:01-19 16:33:33 (0.051)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43088739, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['30'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.75769\",\"20.16784\",2780.6]},\"properties\":{\"tripId\":116966,\"messageId\":43088780,\"messageDateTime\":\"2025-01-19 16:38:36\",\"messageDateTimeUTC\":\"2025-01-19T22:38:36Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"11.8\",\"kph\":\"18.9\",\"knots\":\"10.2\",\"bearing\":205,\"nearest\":null,\"messageText\":\"8178:30:[20]:01-19 16:38:36 (0.852)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43088780, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['31'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.76531\",\"20.14977\",2735.1]},\"properties\":{\"tripId\":116966,\"messageId\":43088810,\"messageDateTime\":\"2025-01-19 16:43:43\",\"messageDateTimeUTC\":\"2025-01-19T22:43:43Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"25.39\",\"kph\":40.9,\"knots\":22.1,\"bearing\":201,\"nearest\":null,\"messageText\":\"8192:31:[17]:01-19 16:43:43 (0.858)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43088810, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['32'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.79626\",\"20.13721\",2540.9]},\"properties\":{\"tripId\":116966,\"messageId\":43088845,\"messageDateTime\":\"2025-01-19 16:48:48\",\"messageDateTimeUTC\":\"2025-01-19T22:48:48Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"30.94\",\"kph\":49.8,\"knots\":26.9,\"bearing\":246,\"nearest\":null,\"messageText\":\"8205:32:[5]:01-19 16:48:48 (0.055)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43088845, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['33'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.81343\",\"20.12417\",2468.1]},\"properties\":{\"tripId\":116966,\"messageId\":43088913,\"messageDateTime\":\"2025-01-19 16:53:52\",\"messageDateTimeUTC\":\"2025-01-19T22:53:52Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"16.9\",\"kph\":\"27.4\",\"knots\":\"14.7\",\"bearing\":231,\"nearest\":null,\"messageText\":\"8217:33:[26]:01-19 16:53:52 (0.849)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43088913, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['34'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.81003\",\"20.10251\",2502.2]},\"properties\":{\"tripId\":116966,\"messageId\":43088944,\"messageDateTime\":\"2025-01-19 16:58:58\",\"messageDateTimeUTC\":\"2025-01-19T22:58:58Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"17.8\",\"kph\":\"28.7\",\"knots\":\"15.4\",\"bearing\":171,\"nearest\":null,\"messageText\":\"8230:34:[14]:01-19 16:58:58 (0.868)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43088944, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['35'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.79095\",\"20.06857\",2368.2]},\"properties\":{\"tripId\":116966,\"messageId\":43088972,\"messageDateTime\":\"2025-01-19 17:04:04\",\"messageDateTimeUTC\":\"2025-01-19T23:04:04Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"26.37\",\"kph\":42.4,\"knots\":22.9,\"bearing\":152,\"nearest\":null,\"messageText\":\"8244:35:[23]:01-19 17:04:04 (0.019)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43088972, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['36'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.79438\",\"20.04231\",2351.5]},\"properties\":{\"tripId\":116966,\"messageId\":43089016,\"messageDateTime\":\"2025-01-19 17:09:07\",\"messageDateTimeUTC\":\"2025-01-19T23:09:07Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"20.94\",\"kph\":33.7,\"knots\":18.2,\"bearing\":186,\"nearest\":null,\"messageText\":\"8257:36:[25]:01-19 17:09:07 (0.023)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089016, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['37'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.79480\",\"20.04141\",2346.8]},\"properties\":{\"tripId\":116966,\"messageId\":43089104,\"messageDateTime\":\"2025-01-19 17:21:54\",\"messageDateTimeUTC\":\"2025-01-19T23:21:54Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"13.89\",\"kph\":22.4,\"knots\":12.1,\"bearing\":203,\"nearest\":null,\"messageText\":\"8487:37:[5]:01-19 17:21:54 (0.058)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089104, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['38'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.82787\",\"20.00431\",2371.8]},\"properties\":{\"tripId\":116966,\"messageId\":43089130,\"messageDateTime\":\"2025-01-19 17:26:58\",\"messageDateTimeUTC\":\"2025-01-19T23:26:58Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"62.70\",\"kph\":100.9,\"knots\":54.5,\"bearing\":219,\"nearest\":null,\"messageText\":\"8504:38:[15]:01-19 17:26:58 (0.844)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089130, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['39'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.86634\",\"19.95624\",2328.8]},\"properties\":{\"tripId\":116966,\"messageId\":43089158,\"messageDateTime\":\"2025-01-19 17:32:03\",\"messageDateTimeUTC\":\"2025-01-19T23:32:03Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"49.1\",\"kph\":\"79.0\",\"knots\":\"42.7\",\"bearing\":216,\"nearest\":null,\"messageText\":\"8517:39:[24]:01-19 17:32:03 (0.853)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089158, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['40'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.91803\",\"19.90897\",2316.8]},\"properties\":{\"tripId\":116966,\"messageId\":43089190,\"messageDateTime\":\"2025-01-19 17:37:10\",\"messageDateTimeUTC\":\"2025-01-19T23:37:10Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"55.0\",\"kph\":\"88.4\",\"knots\":\"47.8\",\"bearing\":225,\"nearest\":null,\"messageText\":\"8532:40:[17]:01-19 17:37:10 (0.855)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089190, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['41'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.94910\",\"19.85146\",2330]},\"properties\":{\"tripId\":116966,\"messageId\":43089212,\"messageDateTime\":\"2025-01-19 17:42:15\",\"messageDateTimeUTC\":\"2025-01-19T23:42:15Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"57.82\",\"kph\":93.1,\"knots\":50.2,\"bearing\":206,\"nearest\":null,\"messageText\":\"8551:41:[29]:01-19 17:42:15 (0.015)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089212, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['42'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.94630\",\"19.80929\",2312.4]},\"properties\":{\"tripId\":116966,\"messageId\":43089244,\"messageDateTime\":\"2025-01-19 17:47:22\",\"messageDateTimeUTC\":\"2025-01-19T23:47:22Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"45.61\",\"kph\":73.4,\"knots\":39.6,\"bearing\":176,\"nearest\":null,\"messageText\":\"8567:42:[14]:01-19 17:47:22 (0.025)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089244, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['43'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.94622\",\"19.74290\",2276.4]},\"properties\":{\"tripId\":116966,\"messageId\":43089270,\"messageDateTime\":\"2025-01-19 17:52:28\",\"messageDateTimeUTC\":\"2025-01-19T23:52:28Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"64.33\",\"kph\":103.5,\"knots\":55.9,\"bearing\":179,\"nearest\":null,\"messageText\":\"8591:43:[25]:01-19 17:52:28 (0.025)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089270, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['44'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-98.98221\",\"19.68495\",2302.9]},\"properties\":{\"tripId\":116966,\"messageId\":43089296,\"messageDateTime\":\"2025-01-19 17:57:28\",\"messageDateTimeUTC\":\"2025-01-19T23:57:28Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"55.7\",\"kph\":\"89.6\",\"knots\":\"48.4\",\"bearing\":210,\"nearest\":null,\"messageText\":\"8609:44:[22]:01-19 17:57:28 (0.022)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089296, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['45'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.02129\",\"19.63518\",2244.8]},\"properties\":{\"tripId\":116966,\"messageId\":43089336,\"messageDateTime\":\"2025-01-19 18:02:28\",\"messageDateTimeUTC\":\"2025-01-20T00:02:28Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"51.4\",\"kph\":\"82.6\",\"knots\":\"44.6\",\"bearing\":216,\"nearest\":null,\"messageText\":\"8630:46:[22]:01-19 18:02:28 (0.021)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089336, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['46'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.02958\",\"19.61940\",2242.9]},\"properties\":{\"tripId\":116966,\"messageId\":43089360,\"messageDateTime\":\"2025-01-19 18:07:33\",\"messageDateTimeUTC\":\"2025-01-20T00:07:33Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"4.18\",\"kph\":6.7,\"knots\":3.6,\"bearing\":206,\"nearest\":null,\"messageText\":\"8643:47:[23]:01-19 18:07:33 (0.023)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089360, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['47'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.03044\",\"19.61784\",2237.5]},\"properties\":{\"tripId\":116966,\"messageId\":43089383,\"messageDateTime\":\"2025-01-19 18:12:40\",\"messageDateTimeUTC\":\"2025-01-20T00:12:40Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"2.10\",\"kph\":3.4,\"knots\":1.8,\"bearing\":207,\"nearest\":null,\"messageText\":\"8647:48:[14]:01-19 18:12:40 (0.050)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089383, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['48'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.04799\",\"19.57524\",2273.8]},\"properties\":{\"tripId\":116966,\"messageId\":43089404,\"messageDateTime\":\"2025-01-19 18:17:44\",\"messageDateTimeUTC\":\"2025-01-20T00:17:44Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"50.33\",\"kph\":81,\"knots\":43.7,\"bearing\":201,\"nearest\":null,\"messageText\":\"8665:49:[25]:01-19 18:17:44 (0.044)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089404, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['49'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.08980\",\"19.52325\",2253.5]},\"properties\":{\"tripId\":116966,\"messageId\":43089427,\"messageDateTime\":\"2025-01-19 18:22:47\",\"messageDateTimeUTC\":\"2025-01-20T00:22:47Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"42.64\",\"kph\":68.6,\"knots\":37.1,\"bearing\":217,\"nearest\":null,\"messageText\":\"8689:50:[29]:01-19 18:22:47 (0.853)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089427, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['50'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.11923\",\"19.49774\",2220]},\"properties\":{\"tripId\":116966,\"messageId\":43089448,\"messageDateTime\":\"2025-01-19 18:27:55\",\"messageDateTimeUTC\":\"2025-01-20T00:27:55Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"13.94\",\"kph\":22.4,\"knots\":12.1,\"bearing\":227,\"nearest\":null,\"messageText\":\"8707:51:[29]:01-19 18:27:55 (0.059)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089448, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['51'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.12711\",\"19.48394\",2192.3]},\"properties\":{\"tripId\":116966,\"messageId\":43089484,\"messageDateTime\":\"2025-01-19 18:32:59\",\"messageDateTimeUTC\":\"2025-01-20T00:32:59Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"0.74\",\"kph\":1.2,\"knots\":0.6,\"bearing\":208,\"nearest\":null,\"messageText\":\"8720:52:[14]:01-19 18:32:59 (0.053)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089484, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['52'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.12839\",\"19.48278\",2243.4]},\"properties\":{\"tripId\":116966,\"messageId\":43089560,\"messageDateTime\":\"2025-01-19 18:55:01\",\"messageDateTimeUTC\":\"2025-01-20T00:55:01Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"20.47\",\"kph\":32.9,\"knots\":17.8,\"bearing\":226,\"nearest\":null,\"messageText\":\"9236:53:[4]:01-19 18:55:02 (0.063)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089560, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['53'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.11816\",\"19.46605\",2246.8]},\"properties\":{\"tripId\":116966,\"messageId\":43089574,\"messageDateTime\":\"2025-01-19 19:00:01\",\"messageDateTimeUTC\":\"2025-01-20T01:00:01Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"0.43\",\"kph\":0.7,\"knots\":0.4,\"bearing\":150,\"nearest\":null,\"messageText\":\"9251:68:[4]:01-19 19:00:02 (0.083)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089574, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['54'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.12337\",\"19.44023\",2244.7]},\"properties\":{\"tripId\":116966,\"messageId\":43089583,\"messageDateTime\":\"2025-01-19 19:05:02\",\"messageDateTimeUTC\":\"2025-01-20T01:05:02Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"28.77\",\"kph\":46.3,\"knots\":25,\"bearing\":190,\"nearest\":null,\"messageText\":\"9267:84:[4]:01-19 19:05:03 (0.053)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089583, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['55'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.13377\",\"19.42142\",2243.7]},\"properties\":{\"tripId\":116966,\"messageId\":43089590,\"messageDateTime\":\"2025-01-19 19:10:02\",\"messageDateTimeUTC\":\"2025-01-20T01:10:02Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"48.34\",\"kph\":77.8,\"knots\":42,\"bearing\":207,\"nearest\":null,\"messageText\":\"9281:98:[3]:01-19 19:10:03 (0.072)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089590, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['56'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.14157\",\"19.37063\",2246.7]},\"properties\":{\"tripId\":116966,\"messageId\":43089601,\"messageDateTime\":\"2025-01-19 19:15:03\",\"messageDateTimeUTC\":\"2025-01-20T01:15:03Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"28.78\",\"kph\":46.3,\"knots\":25,\"bearing\":188,\"nearest\":null,\"messageText\":\"9310:127:[3]:01-19 19:15:04 (0.054)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089601, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['57'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.13039\",\"19.35358\",2247.2]},\"properties\":{\"tripId\":116966,\"messageId\":43089614,\"messageDateTime\":\"2025-01-19 19:20:04\",\"messageDateTimeUTC\":\"2025-01-20T01:20:04Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"0.00\",\"kph\":0,\"knots\":0,\"bearing\":148,\"nearest\":null,\"messageText\":\"9327:144:[4]:01-19 19:20:05 (0.057)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089614, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['58'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.12858\",\"19.35385\",2247.8]},\"properties\":{\"tripId\":116966,\"messageId\":43089627,\"messageDateTime\":\"2025-01-19 19:25:04\",\"messageDateTimeUTC\":\"2025-01-20T01:25:04Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"0.00\",\"kph\":0,\"knots\":0,\"bearing\":81,\"nearest\":null,\"messageText\":\"9329:146:[4]:01-19 19:25:05 (0.080)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089627, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['59'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.13037\",\"19.35337\",2247.7]},\"properties\":{\"tripId\":116966,\"messageId\":43089654,\"messageDateTime\":\"2025-01-19 19:31:56\",\"messageDateTimeUTC\":\"2025-01-20T01:31:56Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"22.16\",\"kph\":35.7,\"knots\":19.3,\"bearing\":254,\"nearest\":null,\"messageText\":\"9350:147:[3]:01-19 19:31:57 (0.055)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089654, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['60'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.13717\",\"19.33836\",2248.3]},\"properties\":{\"tripId\":116966,\"messageId\":43089670,\"messageDateTime\":\"2025-01-19 19:36:57\",\"messageDateTimeUTC\":\"2025-01-20T01:36:57Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"0.14\",\"kph\":0.2,\"knots\":0.1,\"bearing\":203,\"nearest\":null,\"messageText\":\"9361:158:[6]:01-19 19:36:58 (0.049)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089670, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['61'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.12584\",\"19.31620\",2245.8]},\"properties\":{\"tripId\":116966,\"messageId\":43089680,\"messageDateTime\":\"2025-01-19 19:41:57\",\"messageDateTimeUTC\":\"2025-01-20T01:41:57Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"0.00\",\"kph\":0,\"knots\":0,\"bearing\":154,\"nearest\":null,\"messageText\":\"9376:173:[4]:01-19 19:41:58 (0.074)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089680, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['62'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.12953\",\"19.29445\",2235.8]},\"properties\":{\"tripId\":116966,\"messageId\":43089692,\"messageDateTime\":\"2025-01-19 19:46:58\",\"messageDateTimeUTC\":\"2025-01-20T01:46:58Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"7.14\",\"kph\":11.5,\"knots\":6.2,\"bearing\":189,\"nearest\":null,\"messageText\":\"9392:189:[8]:01-19 19:46:59 (0.054)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089692, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['63'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.13783\",\"19.30015\",2241.9]},\"properties\":{\"tripId\":116966,\"messageId\":43089701,\"messageDateTime\":\"2025-01-19 19:51:59\",\"messageDateTimeUTC\":\"2025-01-20T01:51:59Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"4.79\",\"kph\":7.7,\"knots\":4.2,\"bearing\":306,\"nearest\":null,\"messageText\":\"9398:195:[14]:01-19 19:51:59 (0.076)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089701, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['64'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.13837\",\"19.29890\",2248]},\"properties\":{\"tripId\":116966,\"messageId\":43089783,\"messageDateTime\":\"2025-01-19 20:20:22\",\"messageDateTimeUTC\":\"2025-01-20T02:20:22Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"12.36\",\"kph\":19.9,\"knots\":10.7,\"bearing\":202,\"nearest\":null,\"messageText\":\"10103:196:[3]:01-19 20:20:22 (1.377)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089783, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['65'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.13956\",\"19.32513\",2236.3]},\"properties\":{\"tripId\":116966,\"messageId\":43089799,\"messageDateTime\":\"2025-01-19 20:25:24\",\"messageDateTimeUTC\":\"2025-01-20T02:25:24Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"30.60\",\"kph\":49.2,\"knots\":26.6,\"bearing\":357,\"nearest\":null,\"messageText\":\"10119:197:[21]:01-19 20:25:24 (0.038)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; color: #000;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089799, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['66'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.15073\",\"19.33550\",2248.3]},\"properties\":{\"tripId\":116966,\"messageId\":43089812,\"messageDateTime\":\"2025-01-19 20:30:24\",\"messageDateTimeUTC\":\"2025-01-20T02:30:24Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"12.2\",\"kph\":\"19.7\",\"knots\":\"10.6\",\"bearing\":314,\"nearest\":null,\"messageText\":\"10127:198:[25]:01-19 20:30:24 (0.027)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089812, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['67'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.15652\",\"19.33525\",2256]},\"properties\":{\"tripId\":116966,\"messageId\":43089822,\"messageDateTime\":\"2025-01-19 20:35:29\",\"messageDateTimeUTC\":\"2025-01-20T02:35:29Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"12.73\",\"kph\":20.5,\"knots\":11.1,\"bearing\":267,\"nearest\":null,\"messageText\":\"10136:199:[27]:01-19 20:35:29 (0.872)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#0f0\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089822, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['68'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n var feature = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.15434\",\"19.33297\",2250.6]},\"properties\":{\"tripId\":116966,\"messageId\":43089836,\"messageDateTime\":\"2025-01-19 20:40:30\",\"messageDateTimeUTC\":\"2025-01-20T02:40:30Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"2.5\",\"kph\":\"4.1\",\"knots\":\"2.2\",\"bearing\":0,\"nearest\":null,\"messageText\":\"10138:201:[5]:01-19 20:40:30 (0.022)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#fff\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\",\"borderColor\":\"#27f600\"}};\n\n var a = null;\n bearing = 0;\n var hasPic = false;\n if (feature.geometry.type === 'Point') {\n if (feature.properties.smallPic !== undefined && feature.properties.smallPic !== null && feature.properties.smallPic.length > 0 && feature.properties.largePic !== undefined && feature.properties.largePic !== null && feature.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + feature.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(feature.geometry.coordinates)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n markersWithPics.push(m);\n hasPic = true;\n }\n\n if (feature.properties.messageType === 'TRACK') {\n a = document.createElement('div');\n bearing = feature.properties.bearing;\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle;\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'CUST') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'OK') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'HELP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKRES') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else if (feature.properties.messageType === 'TRKSTP') {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; font-size: 6px; vertical-align: middle; color: \" + feature.properties.color + \";\";\n a.innerHTML = '';\n } else {\n a = document.createElement('div');\n a.style = \"color: \" + feature.properties.color + \"; background-color: #eee; padding: 2px; border: 1px solid #000; border-radius: 4px;\";\n a.innerHTML = feature.properties.icon;\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089836, 'TRACK'); });\n\n var anchor = 'center';\n var m = new mapboxgl.Marker({ 'element': a, 'rotation': bearing, 'color': feature.properties.color, 'anchor': anchor })\n .setLngLat(feature.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(feature.geometry.coordinates);\n markers.push(m);\n if (hasPic) {\n picListMarkers['69'] = m;\n plHtml += '
\"A<\/div>';\n }\n }\n af = {\"type\":\"Feature\",\"geometry\":{\"type\":\"Point\",\"coordinates\":[\"-99.15434\",\"19.33297\",2250.6]},\"properties\":{\"tripId\":116966,\"messageId\":43089836,\"messageDateTime\":\"2025-01-19 20:40:30\",\"messageDateTimeUTC\":\"2025-01-20T02:40:30Z\",\"timezone\":\"America\\\/Mexico_City\",\"messageType\":\"TRACK\",\"messageTypeDescription\":\"Tracking\",\"messageSource\":\"SWConnect\",\"mph\":\"2.5\",\"kph\":\"4.1\",\"knots\":\"2.2\",\"bearing\":0,\"nearest\":null,\"messageText\":\"10138:201:[5]:01-19 20:40:30 (0.022)\",\"smallPic\":null,\"largePic\":null,\"color\":\"#fff\",\"icon\":\"<\\\/i>\",\"profileIcon\":\"fa-solid fa-motorcycle fa-bounce\",\"borderColor\":\"#27f600\"}};\n bearing = 0;\n if (af.type === 'Feature' && af.geometry.type === 'Point') {\n el = document.createElement('div');\n \/\/el.className = \"sw-marker-last-active\";\n if (af.properties.messageType === 'OK') {\n el.style = \"color: #000; background-color: #0f0;padding: 2px; border: 2px solid \" + af.properties.borderColor + \"; border-radius: 4px;\";\n el.innerHTML = '<\/i>';\n bearing = af.properties.bearing;\n } else if (af.properties.messageType === 'TRACK' || af.properties.messageType === 'TRACE') {\n el.style = \"color: #000; background-color: #ffa500;padding: 2px; border: 2px solid \" + af.properties.borderColor + \"; border-radius: 4px;\";\n el.innerHTML = '<\/i>';\n bearing = af.properties.bearing;\n } else if (af.properties.messageType === 'CUST') {\n el.style = \"color: #000; background-color: #ff0;padding: 2px; border: 2px solid \" + af.properties.borderColor + \"; border-radius: 4px;\";\n el.innerHTML = '<\/i>';\n bearing = af.properties.bearing;\n } else if (af.properties.messageType === 'HELP') {\n el.style = \"color: #000; background-color: #f00;padding: 2px; border: 2px solid \" + af.properties.borderColor + \"; border-radius: 4px;\";\n el.innerHTML = '<\/i>';\n bearing = af.properties.bearing;\n } else {\n el.style = \"color: #000; background-color: #eee;padding: 2px; border: 2px solid \" + af.properties.borderColor + \"; border-radius: 4px;\";\n el.innerHTML = '<\/i>';\n }\n\n p = new mapboxgl.Popup({ offset: 3, maxWidth: 'none', closeButton: true });\n p.on('open', function(e) { displayPopup(e.target, 116966, 43089836, 'TRACK'); });\n\n m = new mapboxgl.Marker({ 'element': el, 'rotation': bearing })\n .setLngLat(af.geometry.coordinates)\n .setPopup(p)\n .addTo(map);\n bounds.extend(af.geometry.coordinates);\n markers.push(m);\n if (lastLocation == null) lastLocation = af.geometry.coordinates;\n if (af.properties.smallPic !== undefined && af.properties.smallPic !== null && af.properties.smallPic.length > 0 && af.properties.largePic !== undefined && af.properties.largePic !== null && af.properties.largePic.length > 0) {\n a = document.createElement('div');\n a.style = \"display: inline-block; padding: 0; margin: 0; text-align: center; vertical-align: middle; opacity: 0.8; color: \" + af.properties.color + \";\";\n a.innerHTML = '\"\"<\/a>';\n\n m = new mapboxgl.Marker({ 'element': a, 'anchor': 'bottom-left' })\n .setLngLat(af.geometry.coordinates)\n .addTo(map);\n markers.push(m);\n markersWithPics.push(m);\n picListMarkers['70'] = m;\n plHtml += '
\"A<\/div>';\n }\n\n }\n \nif (plHtml.length > 0) {\n picList.html('
' + plHtml + '<\/div>');\n} else {\n picList.html('<\/i>Sorry. This trip does not have any locations with pictures.');\n}\n\n var nc = $('#message-counts');\n var t = '
Message Type<\/th>Available<\/th>On Map<\/th><\/tr><\/thead>';\n t += '
Custom<\/td>1<\/td>1<\/td><\/tr>';\n t += '
Tracking<\/td>68<\/td>68<\/td><\/tr>';\n t += '<\/table>';\n nc.html(t);\n\n if (! bounds.isEmpty()) map.fitBounds(bounds, { padding: 80 });\n\n$('#num-views').html('<\/i> 10');\n\n\n\n","nextSegment":-1}