lat-lng-to-tile
Convert latitude and longitude coordinates to map tile coordinates (x, y) for a specific zoom level using the web mercator projection, ideal for mapping and geospatial applications.
Instructions
Convert latitude/longitude coordinates to map tile coordinates (x, y) for a given zoom level. Uses the same web mercator projection as MapKit.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
lat | Yes | Latitude in decimal degrees (-90 to 90) | |
lng | Yes | Longitude in decimal degrees (-180 to 180) | |
zoom | Yes | Zoom level (0-18) |
Input Schema (JSON Schema)
{
"properties": {
"lat": {
"description": "Latitude in decimal degrees (-90 to 90)",
"maximum": 90,
"minimum": -90,
"type": "number"
},
"lng": {
"description": "Longitude in decimal degrees (-180 to 180)",
"maximum": 180,
"minimum": -180,
"type": "number"
},
"zoom": {
"description": "Zoom level (0-18)",
"maximum": 18,
"minimum": 0,
"type": "integer"
}
},
"required": [
"lat",
"lng",
"zoom"
],
"type": "object"
}