[{"data":1,"prerenderedAt":1532},["ShallowReactive",2],{"docs:/docs/high-level-sdks/track":3},{"id":4,"title":5,"body":6,"description":1525,"extension":1526,"meta":1527,"navigation":247,"path":1528,"seo":1529,"stem":1530,"__hash__":1531},"docs/docs/high-level-sdks/track.md","Track SDK",{"type":7,"value":8,"toc":1511},"minimark",[9,14,18,23,34,39,61,65,94,140,144,176,199,203,973,977,980,985,1145,1233,1237,1337,1340,1432,1436,1507],[10,11,13],"h1",{"id":12},"nolagtrack","@nolag/track",[15,16,17],"p",{},"Vehicle and asset GPS tracking with geofencing and location history.",[19,20,22],"h2",{"id":21},"overview","Overview",[15,24,25,26,29,30,33],{},"Track vehicles, delivery drivers, drones, or any moving asset in real time. ",[27,28,13],"code",{}," broadcasts location updates to all zone subscribers instantly. Geofence detection runs client-side using the haversine formula for circular boundaries and a ray-casting algorithm for polygon boundaries, so triggers fire without a server round-trip. Zones group assets by geographic area or fleet. Join multiple zones to observe overlapping regions. Your app owns one core NoLag client and injects it into ",[27,31,32],{},"NoLagTrack","; the wrapper attaches its behaviour to that connection.",[35,36,38],"h3",{"id":37},"key-features","Key Features",[40,41,42,46,49,52,55,58],"ul",{},[43,44,45],"li",{},"Real-time GPS location broadcast to all zone subscribers",[43,47,48],{},"In-memory location buffer per asset for client-side history",[43,50,51],{},"Client-side geofence detection for circle (haversine) and polygon (ray-casting)",[43,53,54],{},"Asset online/offline presence via lobby",[43,56,57],{},"Optional metadata attached to each location point",[43,59,60],{},"Automatic reconnect with zone and presence restoration",[19,62,64],{"id":63},"how-it-works","How It Works",[15,66,67,69,70,73,74,77,78,81,82,85,86,89,90,93],{},[27,68,32],{}," attaches to an injected ",[27,71,72],{},"@nolag/js-sdk"," client and manages a lobby that tracks which assets are online. Calling ",[27,75,76],{},"joinZone(name)"," returns a ",[27,79,80],{},"TrackingZone"," that subscribes to two topics: ",[27,83,84],{},"locations"," for ephemeral GPS points and ",[27,87,88],{},"_geofence"," for ephemeral geofence configuration events. Both topics are ephemeral (no server-side retention) to handle high-frequency GPS data without storage overhead. Location history is maintained in-memory on the client. Geofence evaluation happens locally on receipt of each ",[27,91,92],{},"locationUpdate"," event. No additional server calls are made. The app owns the socket lifecycle; the wrapper never opens or closes it.",[95,96,97,113],"table",{},[98,99,100],"thead",{},[101,102,103,107,110],"tr",{},[104,105,106],"th",{},"Topic",[104,108,109],{},"Purpose",[104,111,112],{},"Replay",[114,115,116,129],"tbody",{},[101,117,118,123,126],{},[119,120,121],"td",{},[27,122,84],{},[119,124,125],{},"GPS location points with optional metadata",[119,127,128],{},"Ephemeral",[101,130,131,135,138],{},[119,132,133],{},[27,134,88],{},[119,136,137],{},"Geofence add/remove events (internal, client-side evaluation)",[119,139,128],{},[19,141,143],{"id":142},"installation","Installation",[145,146,147],"code-tabs",{},[148,149,155],"pre",{"className":150,"code":151,"filename":152,"language":153,"meta":154,"style":154},"language-bash shiki shiki-themes github-light github-dark","npm install @nolag/track @nolag/js-sdk\n","Terminal","bash","",[27,156,157],{"__ignoreMap":154},[158,159,162,166,170,173],"span",{"class":160,"line":161},"line",1,[158,163,165],{"class":164},"sScJk","npm",[158,167,169],{"class":168},"sZZnC"," install",[158,171,172],{"class":168}," @nolag/track",[158,174,175],{"class":168}," @nolag/js-sdk\n",[177,178,180],"note",{"title":179},"Shared connection",[15,181,182,183,186,187,190,191,194,195,198],{},"One core NoLag client can back several wrapper SDKs at once, for example asset tracking, a dashboard, and notify on a single socket, as long as each wrapper uses a distinct ",[27,184,185],{},"appName",". Each wrapper attaches its handlers on construction and releases them with ",[27,188,189],{},"detach()",", and never touches the socket itself. Your app owns ",[27,192,193],{},"connect()"," and ",[27,196,197],{},"disconnect()",".",[19,200,202],{"id":201},"quick-start","Quick Start",[145,204,205],{},[148,206,211],{"className":207,"code":208,"filename":209,"language":210,"meta":154,"style":154},"language-typescript shiki shiki-themes github-light github-dark","import { NoLag } from '@nolag/js-sdk'\nimport { NoLagTrack } from '@nolag/track'\n\n// The app owns one core client. In a browser, pass a token provider so the\n// SDK can mint fresh short-lived client tokens from your backend.\nconst client = NoLag(async () => (await (await fetch('/api/nolag-token')).json()).token)\n\n// Inject the client into the track wrapper\nconst tracker = new NoLagTrack({ client, assetId: 'drv_001', assetName: 'Van 12' })\n\nawait client.connect()   // the app owns the connection\nawait tracker.ready()    // wrapper setup complete\n\n// Join a tracking zone (groups assets by geographic area or fleet)\nconst zone = await tracker.joinZone('fleet-london')\n\n// Device side: report location\nzone.sendLocation({ lat: 51.5074, lng: -0.1278 }, { driverId: 'drv_001', speed: 42 })\n\n// Add a circular geofence (haversine distance check)\nzone.addGeofence({\n  id: 'depot-central',\n  type: 'circle',\n  center: { lat: 51.5074, lng: -0.1278 },\n  radiusMeters: 500,\n  label: 'Central Depot',\n})\n\n// Add a polygon geofence (ray-casting algorithm)\nzone.addGeofence({\n  id: 'zone-east',\n  type: 'polygon',\n  coordinates: [\n    { lat: 51.52, lng: -0.05 },\n    { lat: 51.50, lng: -0.03 },\n    { lat: 51.48, lng: -0.06 },\n    { lat: 51.50, lng: -0.09 },\n  ],\n  label: 'East Zone',\n})\n\n// Controller side: listen for updates\nzone.on('locationUpdate', ({ assetId, point, metadata, timestamp }) => {\n  console.log(`Asset ${assetId} at ${point.lat}, ${point.lng}`)\n})\n\nzone.on('geofenceTriggered', ({ assetId, geofenceId, event }) => {\n  console.log(`Asset ${assetId} ${event} geofence ${geofenceId}`)\n})\n\n// Get in-memory location history for a specific asset\nconst history = await zone.getLocationHistory('drv_001')\nconsole.log(`${history.length} location points in buffer`)\n\n// Teardown: the wrapper releases its handlers; the app closes the socket.\ntracker.detach()\nclient.disconnect()\n","TypeScript","typescript",[27,212,213,229,242,249,256,262,317,322,328,359,364,381,398,403,409,435,440,446,483,488,494,505,517,528,545,556,567,573,578,584,593,603,613,619,637,654,671,687,693,703,708,713,719,763,804,809,814,846,873,878,883,889,913,939,944,950,962],{"__ignoreMap":154},[158,214,215,219,223,226],{"class":160,"line":161},[158,216,218],{"class":217},"szBVR","import",[158,220,222],{"class":221},"sVt8B"," { NoLag } ",[158,224,225],{"class":217},"from",[158,227,228],{"class":168}," '@nolag/js-sdk'\n",[158,230,232,234,237,239],{"class":160,"line":231},2,[158,233,218],{"class":217},[158,235,236],{"class":221}," { NoLagTrack } ",[158,238,225],{"class":217},[158,240,241],{"class":168}," '@nolag/track'\n",[158,243,245],{"class":160,"line":244},3,[158,246,248],{"emptyLinePlaceholder":247},true,"\n",[158,250,252],{"class":160,"line":251},4,[158,253,255],{"class":254},"sJ8bj","// The app owns one core client. In a browser, pass a token provider so the\n",[158,257,259],{"class":160,"line":258},5,[158,260,261],{"class":254},"// SDK can mint fresh short-lived client tokens from your backend.\n",[158,263,265,268,272,275,278,281,284,287,290,293,296,298,300,303,305,308,311,314],{"class":160,"line":264},6,[158,266,267],{"class":217},"const",[158,269,271],{"class":270},"sj4cs"," client",[158,273,274],{"class":217}," =",[158,276,277],{"class":164}," NoLag",[158,279,280],{"class":221},"(",[158,282,283],{"class":217},"async",[158,285,286],{"class":221}," () ",[158,288,289],{"class":217},"=>",[158,291,292],{"class":221}," (",[158,294,295],{"class":217},"await",[158,297,292],{"class":221},[158,299,295],{"class":217},[158,301,302],{"class":164}," fetch",[158,304,280],{"class":221},[158,306,307],{"class":168},"'/api/nolag-token'",[158,309,310],{"class":221},")).",[158,312,313],{"class":164},"json",[158,315,316],{"class":221},"()).token)\n",[158,318,320],{"class":160,"line":319},7,[158,321,248],{"emptyLinePlaceholder":247},[158,323,325],{"class":160,"line":324},8,[158,326,327],{"class":254},"// Inject the client into the track wrapper\n",[158,329,331,333,336,338,341,344,347,350,353,356],{"class":160,"line":330},9,[158,332,267],{"class":217},[158,334,335],{"class":270}," tracker",[158,337,274],{"class":217},[158,339,340],{"class":217}," new",[158,342,343],{"class":164}," NoLagTrack",[158,345,346],{"class":221},"({ client, assetId: ",[158,348,349],{"class":168},"'drv_001'",[158,351,352],{"class":221},", assetName: ",[158,354,355],{"class":168},"'Van 12'",[158,357,358],{"class":221}," })\n",[158,360,362],{"class":160,"line":361},10,[158,363,248],{"emptyLinePlaceholder":247},[158,365,367,369,372,375,378],{"class":160,"line":366},11,[158,368,295],{"class":217},[158,370,371],{"class":221}," client.",[158,373,374],{"class":164},"connect",[158,376,377],{"class":221},"()   ",[158,379,380],{"class":254},"// the app owns the connection\n",[158,382,384,386,389,392,395],{"class":160,"line":383},12,[158,385,295],{"class":217},[158,387,388],{"class":221}," tracker.",[158,390,391],{"class":164},"ready",[158,393,394],{"class":221},"()    ",[158,396,397],{"class":254},"// wrapper setup complete\n",[158,399,401],{"class":160,"line":400},13,[158,402,248],{"emptyLinePlaceholder":247},[158,404,406],{"class":160,"line":405},14,[158,407,408],{"class":254},"// Join a tracking zone (groups assets by geographic area or fleet)\n",[158,410,412,414,417,419,422,424,427,429,432],{"class":160,"line":411},15,[158,413,267],{"class":217},[158,415,416],{"class":270}," zone",[158,418,274],{"class":217},[158,420,421],{"class":217}," await",[158,423,388],{"class":221},[158,425,426],{"class":164},"joinZone",[158,428,280],{"class":221},[158,430,431],{"class":168},"'fleet-london'",[158,433,434],{"class":221},")\n",[158,436,438],{"class":160,"line":437},16,[158,439,248],{"emptyLinePlaceholder":247},[158,441,443],{"class":160,"line":442},17,[158,444,445],{"class":254},"// Device side: report location\n",[158,447,449,452,455,458,461,464,467,470,473,475,478,481],{"class":160,"line":448},18,[158,450,451],{"class":221},"zone.",[158,453,454],{"class":164},"sendLocation",[158,456,457],{"class":221},"({ lat: ",[158,459,460],{"class":270},"51.5074",[158,462,463],{"class":221},", lng: ",[158,465,466],{"class":217},"-",[158,468,469],{"class":270},"0.1278",[158,471,472],{"class":221}," }, { driverId: ",[158,474,349],{"class":168},[158,476,477],{"class":221},", speed: ",[158,479,480],{"class":270},"42",[158,482,358],{"class":221},[158,484,486],{"class":160,"line":485},19,[158,487,248],{"emptyLinePlaceholder":247},[158,489,491],{"class":160,"line":490},20,[158,492,493],{"class":254},"// Add a circular geofence (haversine distance check)\n",[158,495,497,499,502],{"class":160,"line":496},21,[158,498,451],{"class":221},[158,500,501],{"class":164},"addGeofence",[158,503,504],{"class":221},"({\n",[158,506,508,511,514],{"class":160,"line":507},22,[158,509,510],{"class":221},"  id: ",[158,512,513],{"class":168},"'depot-central'",[158,515,516],{"class":221},",\n",[158,518,520,523,526],{"class":160,"line":519},23,[158,521,522],{"class":221},"  type: ",[158,524,525],{"class":168},"'circle'",[158,527,516],{"class":221},[158,529,531,534,536,538,540,542],{"class":160,"line":530},24,[158,532,533],{"class":221},"  center: { lat: ",[158,535,460],{"class":270},[158,537,463],{"class":221},[158,539,466],{"class":217},[158,541,469],{"class":270},[158,543,544],{"class":221}," },\n",[158,546,548,551,554],{"class":160,"line":547},25,[158,549,550],{"class":221},"  radiusMeters: ",[158,552,553],{"class":270},"500",[158,555,516],{"class":221},[158,557,559,562,565],{"class":160,"line":558},26,[158,560,561],{"class":221},"  label: ",[158,563,564],{"class":168},"'Central Depot'",[158,566,516],{"class":221},[158,568,570],{"class":160,"line":569},27,[158,571,572],{"class":221},"})\n",[158,574,576],{"class":160,"line":575},28,[158,577,248],{"emptyLinePlaceholder":247},[158,579,581],{"class":160,"line":580},29,[158,582,583],{"class":254},"// Add a polygon geofence (ray-casting algorithm)\n",[158,585,587,589,591],{"class":160,"line":586},30,[158,588,451],{"class":221},[158,590,501],{"class":164},[158,592,504],{"class":221},[158,594,596,598,601],{"class":160,"line":595},31,[158,597,510],{"class":221},[158,599,600],{"class":168},"'zone-east'",[158,602,516],{"class":221},[158,604,606,608,611],{"class":160,"line":605},32,[158,607,522],{"class":221},[158,609,610],{"class":168},"'polygon'",[158,612,516],{"class":221},[158,614,616],{"class":160,"line":615},33,[158,617,618],{"class":221},"  coordinates: [\n",[158,620,622,625,628,630,632,635],{"class":160,"line":621},34,[158,623,624],{"class":221},"    { lat: ",[158,626,627],{"class":270},"51.52",[158,629,463],{"class":221},[158,631,466],{"class":217},[158,633,634],{"class":270},"0.05",[158,636,544],{"class":221},[158,638,640,642,645,647,649,652],{"class":160,"line":639},35,[158,641,624],{"class":221},[158,643,644],{"class":270},"51.50",[158,646,463],{"class":221},[158,648,466],{"class":217},[158,650,651],{"class":270},"0.03",[158,653,544],{"class":221},[158,655,657,659,662,664,666,669],{"class":160,"line":656},36,[158,658,624],{"class":221},[158,660,661],{"class":270},"51.48",[158,663,463],{"class":221},[158,665,466],{"class":217},[158,667,668],{"class":270},"0.06",[158,670,544],{"class":221},[158,672,674,676,678,680,682,685],{"class":160,"line":673},37,[158,675,624],{"class":221},[158,677,644],{"class":270},[158,679,463],{"class":221},[158,681,466],{"class":217},[158,683,684],{"class":270},"0.09",[158,686,544],{"class":221},[158,688,690],{"class":160,"line":689},38,[158,691,692],{"class":221},"  ],\n",[158,694,696,698,701],{"class":160,"line":695},39,[158,697,561],{"class":221},[158,699,700],{"class":168},"'East Zone'",[158,702,516],{"class":221},[158,704,706],{"class":160,"line":705},40,[158,707,572],{"class":221},[158,709,711],{"class":160,"line":710},41,[158,712,248],{"emptyLinePlaceholder":247},[158,714,716],{"class":160,"line":715},42,[158,717,718],{"class":254},"// Controller side: listen for updates\n",[158,720,722,724,727,729,732,735,739,742,745,747,750,752,755,758,760],{"class":160,"line":721},43,[158,723,451],{"class":221},[158,725,726],{"class":164},"on",[158,728,280],{"class":221},[158,730,731],{"class":168},"'locationUpdate'",[158,733,734],{"class":221},", ({ ",[158,736,738],{"class":737},"s4XuR","assetId",[158,740,741],{"class":221},", ",[158,743,744],{"class":737},"point",[158,746,741],{"class":221},[158,748,749],{"class":737},"metadata",[158,751,741],{"class":221},[158,753,754],{"class":737},"timestamp",[158,756,757],{"class":221}," }) ",[158,759,289],{"class":217},[158,761,762],{"class":221}," {\n",[158,764,766,769,772,774,777,779,782,784,786,789,792,794,796,799,802],{"class":160,"line":765},44,[158,767,768],{"class":221},"  console.",[158,770,771],{"class":164},"log",[158,773,280],{"class":221},[158,775,776],{"class":168},"`Asset ${",[158,778,738],{"class":221},[158,780,781],{"class":168},"} at ${",[158,783,744],{"class":221},[158,785,198],{"class":168},[158,787,788],{"class":221},"lat",[158,790,791],{"class":168},"}, ${",[158,793,744],{"class":221},[158,795,198],{"class":168},[158,797,798],{"class":221},"lng",[158,800,801],{"class":168},"}`",[158,803,434],{"class":221},[158,805,807],{"class":160,"line":806},45,[158,808,572],{"class":221},[158,810,812],{"class":160,"line":811},46,[158,813,248],{"emptyLinePlaceholder":247},[158,815,817,819,821,823,826,828,830,832,835,837,840,842,844],{"class":160,"line":816},47,[158,818,451],{"class":221},[158,820,726],{"class":164},[158,822,280],{"class":221},[158,824,825],{"class":168},"'geofenceTriggered'",[158,827,734],{"class":221},[158,829,738],{"class":737},[158,831,741],{"class":221},[158,833,834],{"class":737},"geofenceId",[158,836,741],{"class":221},[158,838,839],{"class":737},"event",[158,841,757],{"class":221},[158,843,289],{"class":217},[158,845,762],{"class":221},[158,847,849,851,853,855,857,859,862,864,867,869,871],{"class":160,"line":848},48,[158,850,768],{"class":221},[158,852,771],{"class":164},[158,854,280],{"class":221},[158,856,776],{"class":168},[158,858,738],{"class":221},[158,860,861],{"class":168},"} ${",[158,863,839],{"class":221},[158,865,866],{"class":168},"} geofence ${",[158,868,834],{"class":221},[158,870,801],{"class":168},[158,872,434],{"class":221},[158,874,876],{"class":160,"line":875},49,[158,877,572],{"class":221},[158,879,881],{"class":160,"line":880},50,[158,882,248],{"emptyLinePlaceholder":247},[158,884,886],{"class":160,"line":885},51,[158,887,888],{"class":254},"// Get in-memory location history for a specific asset\n",[158,890,892,894,897,899,901,904,907,909,911],{"class":160,"line":891},52,[158,893,267],{"class":217},[158,895,896],{"class":270}," history",[158,898,274],{"class":217},[158,900,421],{"class":217},[158,902,903],{"class":221}," zone.",[158,905,906],{"class":164},"getLocationHistory",[158,908,280],{"class":221},[158,910,349],{"class":168},[158,912,434],{"class":221},[158,914,916,919,921,923,926,929,931,934,937],{"class":160,"line":915},53,[158,917,918],{"class":221},"console.",[158,920,771],{"class":164},[158,922,280],{"class":221},[158,924,925],{"class":168},"`${",[158,927,928],{"class":221},"history",[158,930,198],{"class":168},[158,932,933],{"class":270},"length",[158,935,936],{"class":168},"} location points in buffer`",[158,938,434],{"class":221},[158,940,942],{"class":160,"line":941},54,[158,943,248],{"emptyLinePlaceholder":247},[158,945,947],{"class":160,"line":946},55,[158,948,949],{"class":254},"// Teardown: the wrapper releases its handlers; the app closes the socket.\n",[158,951,953,956,959],{"class":160,"line":952},56,[158,954,955],{"class":221},"tracker.",[158,957,958],{"class":164},"detach",[158,960,961],{"class":221},"()\n",[158,963,965,968,971],{"class":160,"line":964},57,[158,966,967],{"class":221},"client.",[158,969,970],{"class":164},"disconnect",[158,972,961],{"class":221},[19,974,976],{"id":975},"api-reference","API Reference",[35,978,32],{"id":979},"nolagtrack-1",[981,982,984],"h4",{"id":983},"constructor-options","Constructor Options",[95,986,987,1000],{},[98,988,989],{},[101,990,991,994,997],{},[104,992,993],{},"Option",[104,995,996],{},"Type",[104,998,999],{},"Description",[114,1001,1002,1021,1035,1049,1063,1080,1095,1110,1127],{},[101,1003,1004,1009,1014],{},[119,1005,1006],{},[27,1007,1008],{},"client",[119,1010,1011],{},[27,1012,1013],{},"NoLagSocket",[119,1015,1016,1020],{},[1017,1018,1019],"strong",{},"Required."," The injected core NoLag client the app owns and connects.",[101,1022,1023,1027,1032],{},[119,1024,1025],{},[27,1026,738],{},[119,1028,1029],{},[27,1030,1031],{},"string",[119,1033,1034],{},"Stable identifier for this asset (auto-generated if omitted).",[101,1036,1037,1042,1046],{},[119,1038,1039],{},[27,1040,1041],{},"assetName",[119,1043,1044],{},[27,1045,1031],{},[119,1047,1048],{},"Optional human-readable name for this asset.",[101,1050,1051,1055,1060],{},[119,1052,1053],{},[27,1054,749],{},[119,1056,1057],{},[27,1058,1059],{},"Record\u003Cstring, unknown>",[119,1061,1062],{},"Optional custom data attached to asset presence.",[101,1064,1065,1069,1073],{},[119,1066,1067],{},[27,1068,185],{},[119,1070,1071],{},[27,1072,1031],{},[119,1074,1075,1076,1079],{},"NoLag app for topic prefixes (default ",[27,1077,1078],{},"'track'",").",[101,1081,1082,1087,1092],{},[119,1083,1084],{},[27,1085,1086],{},"zoneNames",[119,1088,1089],{},[27,1090,1091],{},"string[]",[119,1093,1094],{},"Tracking zones to auto-join once the wrapper is ready.",[101,1096,1097,1102,1107],{},[119,1098,1099],{},[27,1100,1101],{},"zones",[119,1103,1104],{},[27,1105,1106],{},"Geofence[]",[119,1108,1109],{},"Client-side geofence zones to register on every joined zone.",[101,1111,1112,1117,1122],{},[119,1113,1114],{},[27,1115,1116],{},"maxLocationHistory",[119,1118,1119],{},[27,1120,1121],{},"number",[119,1123,1124,1125,1079],{},"Max location history entries per asset (default ",[27,1126,553],{},[101,1128,1129,1134,1139],{},[119,1130,1131],{},[27,1132,1133],{},"debug",[119,1135,1136],{},[27,1137,1138],{},"boolean",[119,1140,1141,1142,1079],{},"Enable wrapper debug logging (default ",[27,1143,1144],{},"false",[95,1146,1147,1159],{},[98,1148,1149],{},[101,1150,1151,1154,1157],{},[104,1152,1153],{},"Method",[104,1155,1156],{},"Returns",[104,1158,999],{},[114,1160,1161,1176,1190,1204,1218],{},[101,1162,1163,1168,1173],{},[119,1164,1165],{},[27,1166,1167],{},"ready()",[119,1169,1170],{},[27,1171,1172],{},"Promise\u003Cvoid>",[119,1174,1175],{},"Resolves once wrapper setup completed.",[101,1177,1178,1182,1187],{},[119,1179,1180],{},[27,1181,189],{},[119,1183,1184],{},[27,1185,1186],{},"void",[119,1188,1189],{},"Release this wrapper's handlers and topics; terminal, never closes the socket.",[101,1191,1192,1196,1201],{},[119,1193,1194],{},[27,1195,76],{},[119,1197,1198],{},[27,1199,1200],{},"Promise\u003CTrackingZone>",[119,1202,1203],{},"Subscribe to a tracking zone. Returns the zone instance.",[101,1205,1206,1211,1215],{},[119,1207,1208],{},[27,1209,1210],{},"leaveZone(name)",[119,1212,1213],{},[27,1214,1172],{},[119,1216,1217],{},"Unsubscribe from a zone and release its resources.",[101,1219,1220,1225,1230],{},[119,1221,1222],{},[27,1223,1224],{},"getOnlineAssets()",[119,1226,1227],{},[27,1228,1229],{},"Asset[]",[119,1231,1232],{},"Return the list of assets currently present in the lobby.",[35,1234,1236],{"id":1235},"nolagtrack-events","NoLagTrack Events",[95,1238,1239,1251],{},[98,1240,1241],{},[101,1242,1243,1246,1249],{},[104,1244,1245],{},"Event",[104,1247,1248],{},"Payload",[104,1250,999],{},[114,1252,1253,1266,1281,1293,1308,1323],{},[101,1254,1255,1260,1263],{},[119,1256,1257],{},[27,1258,1259],{},"connected",[119,1261,1262],{},"none",[119,1264,1265],{},"WebSocket connection established.",[101,1267,1268,1273,1278],{},[119,1269,1270],{},[27,1271,1272],{},"disconnected",[119,1274,1275],{},[27,1276,1277],{},"reason: string",[119,1279,1280],{},"Connection closed.",[101,1282,1283,1288,1290],{},[119,1284,1285],{},[27,1286,1287],{},"reconnected",[119,1289,1262],{},[119,1291,1292],{},"Connection restored after a drop; zone membership and presence are restored automatically.",[101,1294,1295,1300,1305],{},[119,1296,1297],{},[27,1298,1299],{},"error",[119,1301,1302],{},[27,1303,1304],{},"error: Error",[119,1306,1307],{},"A transport or protocol error occurred.",[101,1309,1310,1315,1320],{},[119,1311,1312],{},[27,1313,1314],{},"assetOnline",[119,1316,1317],{},[27,1318,1319],{},"asset: Asset",[119,1321,1322],{},"An asset joined the lobby.",[101,1324,1325,1330,1334],{},[119,1326,1327],{},[27,1328,1329],{},"assetOffline",[119,1331,1332],{},[27,1333,1319],{},[119,1335,1336],{},"An asset left the lobby.",[35,1338,80],{"id":1339},"trackingzone",[95,1341,1342,1352],{},[98,1343,1344],{},[101,1345,1346,1348,1350],{},[104,1347,1153],{},[104,1349,1156],{},[104,1351,999],{},[114,1353,1354,1372,1390,1404,1418],{},[101,1355,1356,1361,1365],{},[119,1357,1358],{},[27,1359,1360],{},"sendLocation(point, metadata?)",[119,1362,1363],{},[27,1364,1186],{},[119,1366,1367,1368,1371],{},"Broadcast a GPS point ",[27,1369,1370],{},"{ lat, lng }"," with optional metadata to zone subscribers.",[101,1373,1374,1379,1384],{},[119,1375,1376],{},[27,1377,1378],{},"getLocationHistory(assetId?)",[119,1380,1381],{},[27,1382,1383],{},"Promise\u003CLocationPoint[]>",[119,1385,1386,1387,1389],{},"Fetch location points from the in-memory buffer. Omit ",[27,1388,738],{}," to get all assets.",[101,1391,1392,1397,1401],{},[119,1393,1394],{},[27,1395,1396],{},"addGeofence(geofence)",[119,1398,1399],{},[27,1400,1186],{},[119,1402,1403],{},"Register a circle or polygon geofence evaluated on every incoming location update.",[101,1405,1406,1411,1415],{},[119,1407,1408],{},[27,1409,1410],{},"removeGeofence(id)",[119,1412,1413],{},[27,1414,1186],{},[119,1416,1417],{},"Deregister a geofence by its ID.",[101,1419,1420,1425,1429],{},[119,1421,1422],{},[27,1423,1424],{},"getGeofences()",[119,1426,1427],{},[27,1428,1106],{},[119,1430,1431],{},"Return all currently registered geofences for this zone.",[35,1433,1435],{"id":1434},"trackingzone-events","TrackingZone Events",[95,1437,1438,1448],{},[98,1439,1440],{},[101,1441,1442,1444,1446],{},[104,1443,1245],{},[104,1445,1248],{},[104,1447,999],{},[114,1449,1450,1464,1478,1492],{},[101,1451,1452,1456,1461],{},[119,1453,1454],{},[27,1455,92],{},[119,1457,1458],{},[27,1459,1460],{},"{ assetId, point, metadata?, timestamp }",[119,1462,1463],{},"A location point was received from an asset in this zone.",[101,1465,1466,1471,1475],{},[119,1467,1468],{},[27,1469,1470],{},"assetJoined",[119,1472,1473],{},[27,1474,1319],{},[119,1476,1477],{},"An asset joined this zone.",[101,1479,1480,1485,1489],{},[119,1481,1482],{},[27,1483,1484],{},"assetLeft",[119,1486,1487],{},[27,1488,1319],{},[119,1490,1491],{},"An asset left this zone.",[101,1493,1494,1499,1504],{},[119,1495,1496],{},[27,1497,1498],{},"geofenceTriggered",[119,1500,1501],{},[27,1502,1503],{},"{ assetId, geofenceId, geofence, event: 'enter' | 'exit', point }",[119,1505,1506],{},"An asset crossed a geofence boundary. Evaluated client-side on each location update.",[1508,1509,1510],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":154,"searchDepth":231,"depth":231,"links":1512},[1513,1516,1517,1518,1519],{"id":21,"depth":231,"text":22,"children":1514},[1515],{"id":37,"depth":244,"text":38},{"id":63,"depth":231,"text":64},{"id":142,"depth":231,"text":143},{"id":201,"depth":231,"text":202},{"id":975,"depth":231,"text":976,"children":1520},[1521,1522,1523,1524],{"id":979,"depth":244,"text":32},{"id":1235,"depth":244,"text":1236},{"id":1339,"depth":244,"text":80},{"id":1434,"depth":244,"text":1435},"Vehicle and asset GPS tracking with geofencing and location history. Real-time tracking for fleets, delivery drivers, drones, and any moving asset.","md",{},"/docs/high-level-sdks/track",{"title":5,"description":1525},"docs/high-level-sdks/track","kcqPHTTiGTSAUKPbfUTx5Sd3ajXGUwnwnOTNNWAZkCo",1788160344132]