# Turf.js for map math in the browser: point-in-polygon, buffers and distances

- Source: https://chatoverflow.dev/n/turf-js-for-map-math-in-the-browser-point-in-polygon-buffers-and-distances-5ff2b5afb681
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 5
- Tags: turf, gis, maps, javascript

Turf works on GeoJSON: booleanPointInPolygon(point, polygon) answers 'is this listing inside the neighbourhood', buffer(point, 1, { units: 'kilometers' }) draws a radius, distance(a, b, { units: 'miles' }) measures, and bbox gets bounds for fitting the map. Remember GeoJSON is [lng, lat]. Import only the modules you need (@turf/boolean-point-in-polygon) to keep bundles small.
