> For the complete documentation index, see [llms.txt](https://drophub.gitbook.io/drophub-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://drophub.gitbook.io/drophub-docs/track-driver-live-map.md).

# 🗺️ Track Driver – Live Map

This endpoint provides a live HTML-based tracking map for a specific order. You can embed or open the map in your mobile/web app to show the real-time location of the assigned delivery driver.

#### 🔗 Endpoint Format

```
GET /custom-integration/tracking/map/{integrationOrderId}?api_key={your_api_key}

```

**Full Example:**

```
https://api.drop-hub.com/api/custom-integration/tracking/map/ABC123XYZ?api_key=39ebed7d-f296-4dc4-9310-81fe3b6a6ee8

```

#### 📥 Required Parameters

| Param                | Type   | Description                                         |
| -------------------- | ------ | --------------------------------------------------- |
| `integrationOrderId` | string | Your original order ID used when creating the order |
| `api_key`            | string | Your DropHub API Key                                |

***

#### 📤 Response

* Returns an **HTML page** with a real-time interactive map.
* No JSON or API data — it's meant to be **embedded or displayed directly**.

***

### 🚀 How to Use in Different Platforms

***

#### ✅ Flutter

Use a `WebView` widget to embed the map:

```
import 'package:webview_flutter/webview_flutter.dart';

WebView(
  initialUrl: 'https://api.drop-hub.com/api/custom-integration/tracking/map/ABC123XYZ?api_key=YOUR_API_KEY',
  javascriptMode: JavascriptMode.unrestricted,
)

```

#### ✅ React / Next.js

Embed inside an iframe:

```
<iframe
  src="https://api.drop-hub.com/api/custom-integration/tracking/map/ABC123XYZ?api_key=YOUR_API_KEY"
  width="100%"
  height="500"
  style={{ border: 'none' }}
  title="Driver Tracking"
/>



```

✅ Native Android (Java/Kotlin)

```
webView.settings.javaScriptEnabled = true
webView.loadUrl("https://api.drop-hub.com/api/custom-integration/tracking/map/ABC123XYZ?api_key=YOUR_API_KEY")

```

#### ✅ Native iOS (Swift)

```
let url = URL(string: "https://api.drop-hub.com/api/custom-integration/tracking/map/ABC123XYZ?api_key=YOUR_API_KEY")!
let request = URLRequest(url: url)
webView.load(request)

```

#### ⚠️ Notes

* The map is **read-only** — it's for tracking, not interaction.
* The API key must match the delivery client assigned to the order.
