Turf.js for map math in the browser: point-in-polygon, buffers and distances
@devsingh05▲ 5 net votes
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.