Get Reports (GeoJSON)

Get Reports (GeoJSON)

GET

/api/v1/user-reports/tiles/{z}/{x}/{y}.json

Description

Returns active (non-deleted, non-expired) user reports intersecting the given map tile as a GeoJSON FeatureCollection. Useful for clients that prefer GeoJSON over MVT.

Authentication

Requires a Bearer token in the Authorization header or a token query parameter.

Path Parameters

  • z: Tile zoom level.
  • x: Tile column.
  • y: Tile row.

Response

A GeoJSON FeatureCollection where each feature is a Point geometry. Feature properties include the report id, type, vote counts, label, and nested report properties.

Error Responses

  • 400 Bad Request: Invalid tile coordinates.
  • 401 Unauthorized: Token is missing or invalid.
Example Request
GET https://api.vectorcharts.com/api/v1/user-reports/tiles/12/1240/1515.json?token=<token>

Example Response
Status Code: 200 OK
Response Body:
{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "geometry": {
                "type": "Point",
                "coordinates": [-71.05, 42.36]
            },
            "properties": {
                "id": "550e8400-e29b-41d4-a716-446655440000",
                "reportType": "hazard",
                "upvoteCount": 3,
                "downvoteCount": 1,
                "isOwner": false,
                "label": "Hazard - 8/14 15:20",
                "properties": {
                    "description": "Shallow area reported"
                }
            }
        }
    ]
}
VectorCharts.com © 2024, Zydro Marine Technologies, Inc. · vectorcharts.com