Use this file to discover all available pages before exploring further.
Paths are vector overlays drawn directly on the map surface. BuzzTrip supports five path types — line, circle, rectangle, polygon, and text — each of which encodes its geometry as one or more Position values.A Position is a tuple of two or three numbers: [longitude, latitude] or [longitude, latitude, altitude]. Depending on the shape, the points field holds a single Position (e.g. the center of a circle), an array of Position[] (e.g. the vertices of a line or polygon ring), or a nested Position[][] (e.g. a polygon with holes).Measurements (area, perimeter, radius, etc.) and visual styles (stroke color, fill, opacity) are stored alongside the geometry, allowing the client to render and label shapes accurately without recomputing values.All operations require authentication via the authedQuery / authedMutation wrappers.
// A single 2D or 3D coordinatetype Position = [number, number] | [number, number, number];// Depending on the shape:type Points = | Position // single point — used for circles, text | Position[] // array of points — used for lines | Position[][] // nested array — used for polygons (ring + optional holes)
Returns all paths belonging to a map, validated against the full pathsSchema.API path:api.maps.paths.getPathsForMap Type:authedQuery — authentication required
Inserts a new path onto a map. The createdBy field is automatically injected from the authenticated user context — you must not include it in your arguments.API path:api.maps.paths.createPath Type:authedMutation — authentication required
Replaces the fields of an existing path and stamps updatedAt with the current ISO datetime. The full pathsEditSchema is accepted (minus system fields _id and _creationTime).API path:api.maps.paths.editPath Type:authedMutation — authentication required
import { useMutation } from "convex/react";import { api } from "@/convex/_generated/api";import { Id } from "@/convex/_generated/dataModel";const deletePath = useMutation(api.maps.paths.deletePath);const deletedId = await deletePath({ pathId: "path_xyz" as Id<"paths"> });console.log("Deleted path:", deletedId);