LngLatSchema
constLngLatSchema:ZodTuple<[ZodNumber,ZodNumber],null>
Defined in: packages/core/src/schemas/base.schema.ts:79
Geographic coordinates as [longitude, latitude].
Remarks
Section titled “Remarks”Validation Rules:
- Longitude: -180 to 180
- Latitude: -90 to 90
- Must be a 2-element tuple
Follows GeoJSON convention (lng, lat), not (lat, lng).
Common Values:
[0, 0]- Null Island (Gulf of Guinea)[-74.006, 40.7128]- New York City[139.6917, 35.6895]- Tokyo
Examples
Section titled “Examples”YAML
center: [-74.006, 40.7128]TypeScript
const coords = LngLatSchema.parse([-74.006, 40.7128]);