---
name: "xpay-macrostrat-lat-lng-to-tile"
description: "Convert latitude/longitude coordinates to map tile coordinates (x, y) for a given zoom level. Uses the same web mercator projection as MapKit."
version: "1.0.0"
price: "$0.01/call"
provider: "Macrostrat"
---

# Lat Lng To Tile

Convert latitude/longitude coordinates to map tile coordinates (x, y) for a given zoom level. Uses the same web mercator projection as MapKit.

**Provider:** Macrostrat
**Price:** $0.01/call
**Pricing model:** Flat rate per call

## When to Use

Use this tool when you need to convert latitude/longitude coordinates to map tile coordinates (x, y) for a given zoom level. uses the same web mercator projection as mapkit.. This is part of the Macrostrat provider on xpay✦.

## MCP Connection

Connect to xpay✦ to access this tool (and 7+ others):

```json
{
  "mcpServers": {
    "xpay": {
      "url": "https://mcp.xpay.sh/mcp?key=YOUR_API_KEY"
    }
  }
}
```

For Claude Code:
```bash
claude mcp add --transport http xpay "https://mcp.xpay.sh/mcp?key=YOUR_API_KEY"
```

## How to Execute

Use the xpay✦ meta-tools to run this tool:

1. **`xpay_details`** — Get full input schema: `xpay_details("macrostrat/lat-lng-to-tile")`
2. **`xpay_run`** — Execute: `xpay_run("macrostrat/lat-lng-to-tile", { ...inputs })`

## Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `lng` | number | Yes | Longitude in decimal degrees (-180 to 180) |
| `lat` | number | Yes | Latitude in decimal degrees (-90 to 90) |
| `zoom` | integer | Yes | Zoom level (0-18) |

## Pricing

- **Cost:** $0.01/call
- **Balance check:** Use `xpay_balance` to check remaining credits
- Get your API key at [xpay.tools](https://xpay.tools/account/settings/api-keys/) — $5 free credits included

## Related Skills

- [Macrostrat (all tools)](https://xpay.tools/skills/macrostrat/SKILL.md) — 8 tools
- [Find Columns](https://xpay.tools/skills/macrostrat/find-columns/SKILL.md) — $0.01/call
- [Find Units](https://xpay.tools/skills/macrostrat/find-units/SKILL.md) — $0.01/call
- [Defs](https://xpay.tools/skills/macrostrat/defs/SKILL.md) — $0.01/call
- [Defs Autocomplete](https://xpay.tools/skills/macrostrat/defs-autocomplete/SKILL.md) — $0.01/call
- [Mineral Info](https://xpay.tools/skills/macrostrat/mineral-info/SKILL.md) — $0.01/call

## Links

- Tool page: https://xpay.tools/macrostrat/lat-lng-to-tile/
- Provider: https://xpay.tools/macrostrat/
- All tools: https://xpay.tools/explore
